You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some (unknown yet, but I hope it will be soon) reason one of our servers doesn't send CONNECT message (40)
While it is server trouble for sure, client behaviour is interesting
Socket.connected is always false (because there was no 40 received), but it still accepts all 42 later, sucessfully parse them until onevent call...
/** * Called upon a server event. * * @param packet * @private */onevent(packet){constargs=packet.data||[];if(null!=packet.id){args.push(this.ack(packet.id));}if(this.connected){this.emitEvent(args);}else{this.receiveBuffer.push(Object.freeze(args));}}
Here it everytime checks this.connected which is false and pushes the event to receiveBuffer forever
Why we need this if here ? If packet is received and successfully parsed, why not to just emit it ?
PS: there are no exceptions, it just works this way
PPS: as expected it was a server issue. There was some exception in python server connect, and python server worked this way after it. But still i think that silent ignoring packets is no good. Either accept packets, or generate some incorrect protocol initialization error/warning
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For some (unknown yet, but I hope it will be soon) reason one of our servers doesn't send CONNECT message (40)
While it is server trouble for sure, client behaviour is interesting
Socket.connected is always false (because there was no 40 received), but it still accepts all 42 later, sucessfully parse them until onevent call...
Here it everytime checks this.connected which is false and pushes the event to receiveBuffer forever
Why we need this if here ? If packet is received and successfully parsed, why not to just emit it ?
PS: there are no exceptions, it just works this way
PPS: as expected it was a server issue. There was some exception in python server connect, and python server worked this way after it. But still i think that silent ignoring packets is no good. Either accept packets, or generate some incorrect protocol initialization error/warning
Beta Was this translation helpful? Give feedback.
All reactions