We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46a4b9f commit cffb4ebCopy full SHA for cffb4eb
lib/socket.js
@@ -52,8 +52,7 @@
52
if (this.options['sync disconnect on unload'] &&
53
(!this.isXDomain() || io.util.ua.hasCORS)) {
54
var self = this;
55
-
56
- io.util.on(global, 'unload', function () {
+ io.util.on(global, 'beforeunload', function () {
57
self.disconnectSync();
58
}, false);
59
}
@@ -362,11 +361,12 @@
362
361
, this.options.host + ':' + this.options.port
363
, this.options.resource
364
, io.protocol
+ , ''
365
, this.sessionid
366
- ].join('/') + '?disconnect';
+ ].join('/') + '/?disconnect=1';
367
368
- xhr.open('GET', uri, true);
369
- xhr.send(null);
+ xhr.open('GET', uri, false);
+ xhr.send(null);
370
371
// handle disconnection immediately
372
this.onDisconnect('booted');
0 commit comments