From cf53d3e8619fc0f552f9c8b0eb69de11f24e5c96 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Thu, 20 Dec 2018 01:21:03 +0900 Subject: [PATCH] Rescue parser error after streaming listener is closed --- src/main/streaming.js | 3 +++ src/main/websocket.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/streaming.js b/src/main/streaming.js index 32680d20..b9ece101 100644 --- a/src/main/streaming.js +++ b/src/main/streaming.js @@ -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') } diff --git a/src/main/websocket.js b/src/main/websocket.js index 93b52306..89f2654a 100644 --- a/src/main/websocket.js +++ b/src/main/websocket.js @@ -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') }