Merge branch 'fix-double-close'
This commit is contained in:
@@ -105,12 +105,14 @@ var instance = {
|
||||
"The code must be either 1000, or between 3000 and 4999. " +
|
||||
code + " is neither.");
|
||||
|
||||
if (this.readyState !== API.CLOSED) this.readyState = API.CLOSING;
|
||||
var self = this;
|
||||
if (this.readyState < API.CLOSING) {
|
||||
var self = this;
|
||||
this._closeTimer = setTimeout(function() {
|
||||
self._beginClose('', 1006);
|
||||
}, API.CLOSE_TIMEOUT);
|
||||
}
|
||||
|
||||
this._closeTimer = setTimeout(function() {
|
||||
self._beginClose('', 1006);
|
||||
}, API.CLOSE_TIMEOUT);
|
||||
if (this.readyState !== API.CLOSED) this.readyState = API.CLOSING;
|
||||
|
||||
this._driver.close(reason, code);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user