diff --git a/lib/net.js b/lib/net.js index d906211238..6080150724 100644 --- a/lib/net.js +++ b/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);