« get me outta code hell

synchronize playing new tracks across sockets - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/general-util.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-07-11 17:37:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-16 19:03:04 -0300
commitf88d7c4959e7603714a5bb8f25807889a25304ee (patch)
tree5ea79ed92134e25d59e49bbfc82dd19161a565b6 /general-util.js
parent2c7e3c8fb279f20da3d1b4f5610e65dc43a22ac2 (diff)
synchronize playing new tracks across sockets
Diffstat (limited to 'general-util.js')
-rw-r--r--general-util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/general-util.js b/general-util.js
index b4491de..4bfd491 100644
--- a/general-util.js
+++ b/general-util.js
@@ -336,7 +336,7 @@ export async function parseOptions(options, optionDescriptorMap) {
 
 parseOptions.handleDashless = Symbol()
 
-export function silenceEvents(emitter, eventsToSilence, callback) {
+export async function silenceEvents(emitter, eventsToSilence, callback) {
   const oldEmit = emitter.emit
 
   emitter.emit = function(event, ...data) {
@@ -345,7 +345,7 @@ export function silenceEvents(emitter, eventsToSilence, callback) {
     }
   }
 
-  callback()
+  await callback()
 
   emitter.emit = oldEmit
 }