🥅 Catch stream errors

This commit is contained in:
Androz2091 2021-02-18 23:09:10 +01:00
parent 867092f4b7
commit 4a75dae262

View file

@ -1120,6 +1120,8 @@ class Player extends EventEmitter {
}) })
} }
newStream.on('error', (error) => this.emit('error', error, queue.firstMessage))
setTimeout(() => { setTimeout(() => {
if (queue.stream) queue.stream.destroy() if (queue.stream) queue.stream.destroy()
queue.stream = newStream queue.stream = newStream