Skip to content

Commit

Permalink
calculate headers alignment correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed Sep 25, 2014
1 parent 9b124cc commit ee6173d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/message.js
Expand Up @@ -20,7 +20,7 @@ module.exports.unmarshalMessages = function messageParser(stream, onMessage) {
header = stream.read(16);
if (!header) break;
fieldsLength = header.readUInt32LE(12);
fieldsLengthPadded = ((fieldsLength + 3) >> 3) << 3;
fieldsLengthPadded = ((fieldsLength + 7) >> 3) << 3;
bodyLength = header.readUInt32LE(4);
fieldsAndBodyLength = fieldsLengthPadded + bodyLength;
state = 1;
Expand Down

0 comments on commit ee6173d

Please sign in to comment.