aboutsummaryrefslogtreecommitdiff
path: root/module.go
diff options
context:
space:
mode:
authorlawl <github@dumbinter.net>2020-08-02 11:40:44 +0200
committerlawl <github@dumbinter.net>2020-08-02 11:40:44 +0200
commit4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c (patch)
tree7d5264c8d992d3ff12bf337352b0e640aa95e5e7 /module.go
parentc07c021e49beb828c140e6b6e8961653b957e052 (diff)
downloadnoisetorch-4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c.tar.gz
noisetorch-4243d5036d1e7d339ca8ee3ff8a0be88a9f0d92c.zip
Don't fail to display UI when pa connection fails
Additionaly we now re-establish the connection if it fails while we are already running.
Diffstat (limited to 'module.go')
-rw-r--r--module.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/module.go b/module.go
index 4a4ca7b..f2c0a4b 100644
--- a/module.go
+++ b/module.go
@@ -26,6 +26,11 @@ func updateNoiseSupressorLoaded(c *pulseaudio.Client, b *int) {
for {
*b = supressorState(c)
+
+ if !c.Connected() {
+ break
+ }
+
<-upd
}
}