don't handle exception client connection remain in pending...
Opened this issue · 1 comments
stefanocudini commented
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);
});
stefanocudini commented
@JamesKyburz
this row:
https://github.com/JamesKyburz/youtube-audio-stream/blob/v0.3.6/index.js#L37
it doesn't seem to work