We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a55a9ff commit 70dd6d4Copy full SHA for 70dd6d4
1 file changed
lib/http.js
@@ -1089,7 +1089,11 @@ function connectionListener(socket) {
1089
// When we're finished writing the response, check if this is the last
1090
// respose, if so destroy the socket.
1091
res.on('finish', function() {
1092
- assert(incoming[0] === req);
+ // Usually the first incoming element should be our request. it may
1093
+ // be that in the case abortIncoming() was called that the incoming
1094
+ // array will be empty.
1095
+ assert(incoming.length == 0 || incoming[0] === req);
1096
+
1097
incoming.shift();
1098
1099
res.detachSocket(socket);
0 commit comments