Skip to content

Commit

Permalink
test: close debug client in test-debugger-client
Browse files Browse the repository at this point in the history
Killing the debuggee without first closing the socket can result
in an ECONNRESET error.
  • Loading branch information
orangemocha authored and tjfontaine committed Jan 13, 2014
1 parent 8753bb3 commit 1b74892
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/simple/test-debugger-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,14 @@ function doTest(cb, done) {
connectCount++;
console.log('ready!');
cb(c, function() {
console.error('>>> killing node process %d\n\n', nodeProcess.pid);
nodeProcess.kill();
done();
c.end();
c.on('end', function() {
console.error(
'>>> killing node process %d\n\n',
nodeProcess.pid);
nodeProcess.kill();
done();
});
});
});
});
Expand Down

0 comments on commit 1b74892

Please sign in to comment.