Permalink
Browse files

match new streamsearch api

  • Loading branch information...
1 parent a9cbc76 commit 3a147c5076a08cc8334624a7a5009b1e592eb8e0 @mscdex committed Mar 4, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/nntp.js
View
@@ -276,8 +276,8 @@ NNTP.prototype.connect = function(options) {
}
});
- function responseHandler(chunk, start, end) {
- if (isErr)
+ function responseHandler(isMatch, chunk, start, end) {
+ if (isErr || !chunk)
return;
if (self._stream === undefined) {
if (self._buffer === undefined) {
@@ -288,8 +288,8 @@ NNTP.prototype.connect = function(options) {
} else
self._stream.emit('data', chunk.slice(start, end));
}
- this._sbmhML.on('data', responseHandler);
- this._sbmhCRLF.on('data', responseHandler);
+ this._sbmhML.on('info', responseHandler);
+ this._sbmhCRLF.on('info', responseHandler);
this._socket.connect(this.options.port, this.options.host);
};

0 comments on commit 3a147c5

Please sign in to comment.