diff --git a/play-dl/YouTube/classes/LiveStream.ts b/play-dl/YouTube/classes/LiveStream.ts index 85cee36..2aa97dd 100644 --- a/play-dl/YouTube/classes/LiveStream.ts +++ b/play-dl/YouTube/classes/LiveStream.ts @@ -183,10 +183,8 @@ export class Stream { private cleanup(){ clearTimeout(this.timer as NodeJS.Timer) - this.socket?.end() - this.socket?.on('close', () => { - console.log('Socket Closed') - }) + this.socket?.destroy() + this.socket = null this.timer = null this.url = '' this.bytes_count = 0