Permalink
Browse files

Removed unnecessary code from try block. Only decode packet is needed.

  • Loading branch information...
1 parent 3832d67 commit b537b8edf9494f08c81ba83948591c1cb961305f @adelura adelura committed Jul 23, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 socket.io.js
View
3 socket.io.js
@@ -2139,11 +2139,12 @@ Transport.prototype.onOpen = function () {
Transport.prototype.onData = function(data){
try {
var packet = parser.decodePacket(data, this.socket.binaryType);
- this.onPacket(packet);
} catch(e){
e.data = data;
this.onError('parser decode error', e);
+ return;
}
+ this.onPacket(packet);
};
/**

0 comments on commit b537b8e

Please sign in to comment.