Skip to content

Commit 8ff2edd

Browse files
committed
Merge pull request socketio#689 from bwillard/master
Improve performance of parser.decodePayload
2 parents d9d529c + ebd2567 commit 8ff2edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ exports.decodePayload = function (data) {
234234

235235
for (var i = 1, length = ''; i < data.length; i++) {
236236
if (data[i] == '\ufffd') {
237-
ret.push(exports.decodePacket(data.substr(i + 1).substr(0, length)));
237+
ret.push(exports.decodePacket(data.substr(i + 1, length)));
238238
i += Number(length) + 1;
239239
length = '';
240240
} else {

0 commit comments

Comments
 (0)