Skip to content

Commit

Permalink
Fixed bug with buffer.slice() and large request data
Browse files Browse the repository at this point in the history
  • Loading branch information
tautologistics authored and fictorial committed May 1, 2010
1 parent 9c5ea3c commit 9bdf4ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/redis-client.js
Expand Up @@ -743,7 +743,9 @@ Client.prototype.sendCommand = function () {

if (this.stream.writable) {
this.originalCommands.push(originalCommand);
this.stream.write(this.requestBuffer.slice(0, offset), 'binary');
var outBuffer = new Buffer(offset);
this.requestBuffer.copy(outBuffer, 0, 0, offset);
this.stream.write(outBuffer, 'binary');

if (exports.debugMode)
sys.debug("[SEND] " + debugFilter(this.requestBuffer, offset) +
Expand Down

0 comments on commit 9bdf4ea

Please sign in to comment.