From 3d0f3fcf748d2e1c7da3cd6dd66e543a9eaec13b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 Apr 2018 01:52:26 +0200 Subject: [PATCH] log when websocket disconnected --- webpack/lib/audio-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack/lib/audio-manager.js b/webpack/lib/audio-manager.js index b0d4edd..704007d 100644 --- a/webpack/lib/audio-manager.js +++ b/webpack/lib/audio-manager.js @@ -98,7 +98,7 @@ export default class AudioManager{ let buf16 = this.f32toi16(buf32); - if( this.ws ) + if( this.ws && this.ws.readyState === 1 ) console.log(`send buffer[${buf16.length}]`); else console.log(`websocket not connected`);