test: terminate gracefully in cluster-net-send

Killing the worker without ensuring the socket was closed
was causing intermittent ECONNRESET errors.
This commit is contained in:
Alexis Campailla authored and Timothy J Fontaine committed 2014-01-13 15:15:10 -08:00
1 parent fc52ed85f6
commit 2e3da9be84
1 file changed
+3
+3
View File
@@ -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();
});
});