Rescue parser error after streaming listener is closed

This commit is contained in:
AkiraFukushima 2018-12-20 01:21:03 +09:00
parent dd02d2e4e5
commit cf53d3e861
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,9 @@ export default class Streaming {
this.listener.on('error', (e) => {
log.error(e)
})
this.listener.on('parser-error', (e) => {
log.error(e)
})
this.listener.stop()
log.info('streaming stopped')
}

View File

@ -75,6 +75,9 @@ export default class WebSocket {
this.listener.on('error', (e) => {
log.error(e)
})
this.listener.on('parser-error', (e) => {
log.error(e)
})
this.listener.stop()
log.info('streaming stopped')
}