mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
socket: fix closing the socket in an open listener [mmastrac]
This commit is contained in:
@@ -255,7 +255,9 @@ Socket.prototype.onOpen = function () {
|
||||
this.onopen && this.onopen.call(this);
|
||||
this.flush();
|
||||
|
||||
if (this.upgrade && this.transport.pause) {
|
||||
// we check for `readyState` in case an `open`
|
||||
// listener alreay closed the socket
|
||||
if ('open' == this.readyState && this.upgrade && this.transport.pause) {
|
||||
debug('starting upgrade probes');
|
||||
for (var i = 0, l = this.upgrades.length; i < l; i++) {
|
||||
this.probe(this.upgrades[i]);
|
||||
|
||||
Reference in New Issue
Block a user