Browse files

net.js: Slice the right buffer in _writeOut

  • Loading branch information...
1 parent b8c0349 commit 684740c23200be67368fb1b225140e06c1fec295 @ry ry committed Apr 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/net.js
View
2 lib/net.js
@@ -490,7 +490,7 @@ Stream.prototype._writeOut = function (data, encoding) {
this._writeWatcher.start();
// Slice out the data left.
- var leftOver = data.slice(off + bytesWritten, off + len);
+ var leftOver = buffer.slice(off + bytesWritten, off + len);
leftOver.used = leftOver.length; // used the whole thing...
// sys.error('data.used = ' + data.used);

0 comments on commit 684740c

Please sign in to comment.