Skip to content

Commit

Permalink
Merge pull request socketio#689 from bwillard/master
Browse files Browse the repository at this point in the history
Improve performance of parser.decodePayload
  • Loading branch information
rauchg committed Dec 16, 2011
2 parents d9d529c + ebd2567 commit 8ff2edd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ exports.decodePayload = function (data) {

for (var i = 1, length = ''; i < data.length; i++) {
if (data[i] == '\ufffd') {
ret.push(exports.decodePacket(data.substr(i + 1).substr(0, length)));
ret.push(exports.decodePacket(data.substr(i + 1, length)));
i += Number(length) + 1;
length = '';
} else {
Expand Down

0 comments on commit 8ff2edd

Please sign in to comment.