fix: emit a CONNECT_ERROR event upon connection failure
See also: 53c73749a8
This commit is contained in:
@@ -91,8 +91,10 @@ public class Socket extends Emitter {
|
||||
add(On.on(io, Manager.EVENT_ERROR, new Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
if (!Socket.this.connected) {
|
||||
Socket.super.emit(EVENT_CONNECT_ERROR, args[0]);
|
||||
}
|
||||
}
|
||||
}));
|
||||
add(On.on(io, Manager.EVENT_CLOSE, new Listener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user