Skip to content

Commit

Permalink
Merge pull request #31 from install/master
Browse files Browse the repository at this point in the history
Fix for node transport layer where the offset was incorrectly reset.
  • Loading branch information
rekotan committed Jan 15, 2015
2 parents 5a366bf + 8fa704c commit be3ddd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion evernote-sdk-js/thrift/lib/node/thrift-node-binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ exports.NodeBinaryHttpTransport = function(url) {
};

this.send = function (client, postData, args, recv_method) {
self.offset = 0;
args = Array.prototype.slice.call(args, 0);
var callback = args.pop();

Expand Down Expand Up @@ -120,6 +119,8 @@ exports.NodeBinaryHttpTransport = function(url) {
return;
}

self.offset = 0;

var buffer = new Buffer(dataLength);
for (var i = 0, len = data.length, pos = 0; i < len; i++) {
data[i].copy(buffer, pos);
Expand Down

0 comments on commit be3ddd5

Please sign in to comment.