Skip to content

Commit 0a2d0b9

Browse files
committed
Fixed disconnect logic
1 parent 4495f59 commit 0a2d0b9

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/socket.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,8 @@ Socket.prototype.disconnect = function () {
277277
if (this.manager.transports[this.id] && this.manager.transports[this.id].open) {
278278
this.manager.transports[this.id].onForcedDisconnect();
279279
} else {
280-
if (this.manager.open[this.id]) {
281-
// if the connection is open in a different node
282-
this.manager.store.publish('disconnect-force:' + this.id);
283-
} else {
284-
this.manager.onClientDisconnect(this.id);
285-
this.manager.store.publish('disconnect:' + this.id);
286-
}
280+
this.manager.onClientDisconnect(this.id);
281+
this.manager.store.publish('disconnect:' + this.id);
287282
}
288283
}
289284

0 commit comments

Comments
 (0)