Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 1b74892

Browse files
orangemochatjfontaine
authored andcommitted
test: close debug client in test-debugger-client
Killing the debuggee without first closing the socket can result in an ECONNRESET error.
1 parent 8753bb3 commit 1b74892

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/simple/test-debugger-client.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,14 @@ function doTest(cb, done) {
197197
connectCount++;
198198
console.log('ready!');
199199
cb(c, function() {
200-
console.error('>>> killing node process %d\n\n', nodeProcess.pid);
201-
nodeProcess.kill();
202-
done();
200+
c.end();
201+
c.on('end', function() {
202+
console.error(
203+
'>>> killing node process %d\n\n',
204+
nodeProcess.pid);
205+
nodeProcess.kill();
206+
done();
207+
});
203208
});
204209
});
205210
});

0 commit comments

Comments
 (0)