From cd1dcce8eeeb5c2c773d94802eb8cbeef6b2df3e Mon Sep 17 00:00:00 2001 From: futpib Date: Fri, 16 Nov 2018 00:24:48 +0300 Subject: [PATCH] Reconnect on pulseaudio restart / after suspend --- store/pulse-middleware.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/store/pulse-middleware.js b/store/pulse-middleware.js index 2580b46..ffa6e79 100644 --- a/store/pulse-middleware.js +++ b/store/pulse-middleware.js @@ -99,6 +99,10 @@ module.exports = store => { reconnect(); }) .on('new', (type, index) => { + if (type === 'server') { + pa.end(); // Reconnect + return; + } store.dispatch(pulseActions.new({ type, index })); getInfo(type, index); })