« get me outta code hell

End flushable when socket disconnects - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/client.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-07-06 11:40:55 -0300
committerFlorrie <towerofnix@gmail.com>2019-07-06 11:40:55 -0300
commitdac84d4998947e49dae1ab9233d88d0edc10413d (patch)
treeb95577d257295ac440c1fca35e127255898f9ac2 /client.js
parent8512c44b6403c126bf961c0fd0c2798d6bfdfcea (diff)
End flushable when socket disconnects
This prevents occasional errors from showing up when a flushable tries
to flush to the socket after it's been closed.
Diffstat (limited to 'client.js')
-rw-r--r--client.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client.js b/client.js
index 7f21d1a..a0c8352 100644
--- a/client.js
+++ b/client.js
@@ -82,7 +82,7 @@ const setupClient = async ({backend, writable, interfacer, appConfig}) => {
     flushable.flush()
   }, 100)
 
-  return {appElement, cleanTerminal, renderInterval}
+  return {appElement, cleanTerminal, flushable, renderInterval}
 }
 
 module.exports = setupClient