fix: ensure buffered events are sent in order
Before this commit, an event sent in the "connect" handler could be sent before the events that were buffered while disconnected. Related: https://github.com/socketio/socket.io-client/issues/1458
This commit is contained in:
@@ -367,8 +367,8 @@ public class Socket extends Emitter {
|
||||
private void onconnect(String id) {
|
||||
this.connected = true;
|
||||
this.id = id;
|
||||
super.emit(EVENT_CONNECT);
|
||||
this.emitBuffered();
|
||||
super.emit(EVENT_CONNECT);
|
||||
}
|
||||
|
||||
private void emitBuffered() {
|
||||
|
||||
Reference in New Issue
Block a user