Client.onend: Anticipate that the HTTP parser object is uninitialized when the client setup failed.

v0.7.4-release
Ben Noordhuis 2010-08-02 11:59:58 +02:00 committed by Ryan Dahl
parent d9fbb8a580
commit 4b19bd2896
1 changed files with 1 additions and 1 deletions

View File

@ -916,7 +916,7 @@ function Client ( ) {
});
self.onend = function () {
parser.finish();
if (parser) parser.finish();
debug("self got end closing. readyState = " + self.readyState);
self.end();
};