mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix test-http-extra-response flakiness
It can happen that the extra response is to be sent in a different chunk from the rest of the data. At this moment, the client might have already closed the socket causing an `ECONNRESET` error. PR-URL: https://github.com/nodejs/node/pull/4979 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
committed by
James M Snell
parent
68a6abc806
commit
e4fc079080
@@ -37,6 +37,10 @@ var server = net.createServer(function(socket) {
|
||||
socket.end(fullResponse);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('error', function(err) {
|
||||
assert.equal(err.code, 'ECONNRESET');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user