Cannot read property '_httpMessage' of null in 0.4.3-pre when ending requests #796

Closed
dudemeister opened this Issue Mar 16, 2011 · 2 comments

4 participants

@dudemeister

I'm randomly getting errors when calling end on a request.

http.js:696
  if (this.output.length === 0 && this.connection._httpMessage === this) {
                                               ^
TypeError: Cannot read property '_httpMessage' of null
    at ServerResponse.end (http.js:696:50)
    at [object Object].<anonymous>   (/home/jelveh/dashboard/releases/20110314204421/node/tasks/image_proxy.js:45:15)
    at [object Object].emit (events.js:61:17)
    at afterRead (fs.js:864:12)

the imageproxy code at 45 (that's the r.end()) looks like this:

    r.writeHead(200, header);

    fs.createReadStream(fileName)
      .addListener('data', function(data){
        r.write(data, 'binary');
      })
      .addListener('end', function(){
        r.end();
      });
@ry
ry commented Mar 18, 2011

please try again on v0.4 HEAD.

@sh1mmer

@dudemeister can you try this again with HEAD please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment