Merge pull request #799 from h3poteto/fix/parserError

Rescue parser error after streaming listener is closed
This commit is contained in:
AkiraFukushima 2018-12-20 23:00:50 +09:00 committed by GitHub
commit 634f4d7406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

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

View File

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