joyent/node — Issue #1892: AssertionError in IncomingMessage 'end' listener
Author: OrangeDog
Created: 2011-10-14 17:02:25+00:00
State: open

Node v0.4.11 after a server we are communicating with terminates the connection due to too large a request.

uncaughtException: undefined
Stack: AssertionError: true == false
at IncomingMessage. (http.js:1341:9)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1231:22)
at Socket._onReadable (net.js:683:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)

Assertion in question is

if (socket.writable) {
debug('AGENT socket.destroySoon()');
socket.destroySoon();
}
assert(!socket.writable);