Permalink
Browse files

Pass response object when emitting 'end'

  • Loading branch information...
1 parent 3a2ebea commit 70917d3153800f6ab70fcf15ed43ea3c99fae905 @jdub committed Mar 26, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/twitter.js
View
@@ -231,9 +231,8 @@ Twitter.prototype.stream = function(method, params, callback) {
response.on('error', function(error) {
stream.emit('error', error);
});
- // FIXME: Somehow provide UPDATED chunks of the response when the stream ends, too
- response.on('end', function () {
- stream.emit('end');
+ response.on('end', function() {
+ stream.emit('end', response);
});
});
request.on('error', function(error) {

0 comments on commit 70917d3

Please sign in to comment.