From 684740c23200be67368fb1b225140e06c1fec295 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 14 Apr 2010 00:41:56 -0700 Subject: [PATCH] net.js: Slice the right buffer in _writeOut --- lib/net.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);