mirror of https://github.com/nodejs/node.git
Fix TJ's assert error
Unable to reproduce but connect's "make test TESTS=test/static.test.js" does it occasionally.pull/22966/head
parent
a55a9ff3c2
commit
70dd6d4ea3
|
@ -1089,7 +1089,11 @@ function connectionListener(socket) {
|
|||
// When we're finished writing the response, check if this is the last
|
||||
// respose, if so destroy the socket.
|
||||
res.on('finish', function() {
|
||||
assert(incoming[0] === req);
|
||||
// Usually the first incoming element should be our request. it may
|
||||
// be that in the case abortIncoming() was called that the incoming
|
||||
// array will be empty.
|
||||
assert(incoming.length == 0 || incoming[0] === req);
|
||||
|
||||
incoming.shift();
|
||||
|
||||
res.detachSocket(socket);
|
||||
|
|
Loading…
Reference in New Issue