From 9d12ef311c7af4bf5feebbb80a41f64eb273af61 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 30 May 2019 22:53:04 +0100 Subject: [PATCH] Improve debug output in WebSocket error guard --- packages/driver-http-node/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/driver-http-node/src/index.js b/packages/driver-http-node/src/index.js index 2d309bd..2646af8 100644 --- a/packages/driver-http-node/src/index.js +++ b/packages/driver-http-node/src/index.js @@ -209,17 +209,17 @@ function _server(host, port, httpsOptions) { react { const facet = currentFacet(); + const id = genUuid('_wsRequest'); const guard = (f) => { try { f() } catch (e) { // Swallow e, which will be some kind of websocket-related exception. - console.debug('WebSocket exception in actor '+facet.actor.toString(), e); + console.debug('WebSocket '+id+' exception in actor '+facet.actor.toString(), e); facet.stop(); } }; - let id = genUuid('_wsRequest'); assert WebSocket(id, server, pieces, url.query); on stop guard(() => ws.close());