« get me outta code hell

Remove backend listeners when client closes - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-07-06 11:42:33 -0300
committerFlorrie <towerofnix@gmail.com>2019-07-06 11:42:33 -0300
commita538d9e79015356d8a2c9f9ecb9e2d961519a22b (patch)
tree92ce60287f04892cf9ae07de82054b0d0f06d8c3
parentff79d16bf5037bd08ba3f12dde44829218ad7397 (diff)
Remove backend listeners when client closes
-rw-r--r--client.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/client.js b/client.js
index a0c8352..190c087 100644
--- a/client.js
+++ b/client.js
@@ -53,6 +53,7 @@ const setupClient = async ({backend, writable, interfacer, appConfig}) => {
   root.select(appElement)
 
   appElement.on('quitRequested', () => {
+    appElement.removeListeners()
     cleanTerminal()
   })