mikeal/request — Issue #126: Throws when aborting the request
Author: diversario
Created: 2011-12-05 15:38:19+00:00
State: open

request 2.2.9

I'm streaming video and when a browser requests a video and then aborts the request I get this:

```
net.js:197
this._handle.readStop();
^
TypeError: Cannot call method 'readStop' of null
at Socket.pause (net.js:197:16)
at IncomingMessage.pause (http.js:254:15)
at Request.pause (/node_modules/request/main.js:549:23)
at Request.ondata (stream.js:39:16)
at Request.emit (events.js:67:17)
at IncomingMessage. (/node_modules/request/main.js:419:16)
at IncomingMessage.emit (events.js:67:17)
at HTTPParser.onBody (http.js:115:23)
at Socket.ondata (http.js:1125:24)
at TCP.onread (net.js:334:27)
```

Also happens seemingly random when requesting a new video.
Streaming is done by saying `request.get(video).pipe(res);`.