« get me outta code hell

Fix potential memory leak from DownloadController.once(canceled) assigned on every .download() - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/http-music.js
diff options
context:
space:
mode:
authorLiam <towerofnix@gmail.com>2017-07-16 09:16:31 -0400
committerLiam <towerofnix@gmail.com>2017-07-16 09:16:31 -0400
commitebada93f0d2b2ec3a158dae2ba43e98d81f3182a (patch)
treea6e984aad71184cc673db1198f874d3a42b0e5b6 /src/http-music.js
parent02059af9feea6326a76be2f5cf623d6ca86a4f78 (diff)
Fix potential memory leak from DownloadController.once(canceled) assigned on every .download()
Diffstat (limited to 'src/http-music.js')
-rwxr-xr-xsrc/http-music.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http-music.js b/src/http-music.js
index 3f1c901..12c93e7 100755
--- a/src/http-music.js
+++ b/src/http-music.js
@@ -33,6 +33,10 @@ function downloadPlaylistFromOptionValue(arg) {
   }
 }
 
+// Let this forever be of use to people who run into
+// maxlistenersexceededwarning.
+process.on('warning', e => console.warn(e.stack))
+
 Promise.resolve()
   .then(async () => {
     let sourcePlaylist = null