From 7082a13d49f6a4919f852c8baf379e4ab80aaded Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Tue, 18 Jul 2017 09:48:06 -0700 Subject: [PATCH] test server end instead of destroy connection --- test-rpc-server/rpc-server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test-rpc-server/rpc-server.js b/test-rpc-server/rpc-server.js index 2a0f450..be3d51f 100644 --- a/test-rpc-server/rpc-server.js +++ b/test-rpc-server/rpc-server.js @@ -52,8 +52,7 @@ replServer.defineCommand('kill', { const sock = global.connections[who]; if (sock) { console.log('killing', who); - sock.write(RpcMessage.sendClose(123, 'killed')); - sock.destroy(); + sock.end(RpcMessage.sendClose(123, 'killed')); } this.displayPrompt(); }