JamesKyburz/youtube-audio-stream

don't handle exception client connection remain in pending...

Opened this issue · 1 comments

With url is an empty string..

I want to close connection to client on url error but it remain in waiting..

const stream = require('youtube-audio-stream')

 	try {
		stream(url).pipe(res)
	}
	catch(e) {

		console.log('error',e);
		res.removeHeader('Transfer-Encoding');
		res.status(400).send('err')
		res.end();
		return
	}

and also thisone dont work..

stream(url).pipe(res).on('error', function(e) {
console.log('error',e);
});