From 381edef1fa9fe3ab3c772a316f3f7567b80a665f Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Mon, 10 Jul 2017 14:54:58 -0700 Subject: [PATCH] testing --- test-rpc-server/rpc-message.js | 2 +- test-rpc-server/rpc-server.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test-rpc-server/rpc-message.js b/test-rpc-server/rpc-message.js index 051ef02..40ad3ee 100644 --- a/test-rpc-server/rpc-message.js +++ b/test-rpc-server/rpc-message.js @@ -59,7 +59,7 @@ class RpcMessage { } catch(e) { console.log(`failed to parse "${msg}"`); console.error(e); - return {}; + return {opcode: OPCODES.CLOSE, message: e.message}; } } }; diff --git a/test-rpc-server/rpc-server.js b/test-rpc-server/rpc-server.js index c10ef43..2a0f450 100644 --- a/test-rpc-server/rpc-server.js +++ b/test-rpc-server/rpc-server.js @@ -51,9 +51,11 @@ replServer.defineCommand('kill', { who = parseInt(who, 10); const sock = global.connections[who]; if (sock) { + console.log('killing', who); sock.write(RpcMessage.sendClose(123, 'killed')); - sock.end(); + sock.destroy(); } this.displayPrompt(); } }); +