From 2e3da9be84f543ecdbffef2e7bf4420d536c78e0 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Mon, 13 Jan 2014 04:57:58 -0800 Subject: [PATCH] test: terminate gracefully in cluster-net-send Killing the worker without ensuring the socket was closed was causing intermittent ECONNRESET errors. --- test/simple/test-cluster-net-send.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/simple/test-cluster-net-send.js b/test/simple/test-cluster-net-send.js index 846ae5d7a6..1313a624a7 100644 --- a/test/simple/test-cluster-net-send.js +++ b/test/simple/test-cluster-net-send.js @@ -38,6 +38,9 @@ if (process.argv[2] !== 'child') { handle.on('data', function(data) { called = true; assert.equal(data.toString(), 'hello'); + }); + + handle.on('end', function() { worker.kill(); }); });