Don't emit further error/close events if the driver is already closing.

This commit is contained in:
James Coglan
2015-02-16 09:08:10 +00:00
parent cc5e5c245e
commit daa37974c6
+1
View File
@@ -304,6 +304,7 @@ var instance = {
},
_fail: function(type, message) {
if (this.readyState > 1) return;
this.emit('error', new Error(message));
this._shutdown(this.ERRORS[type], message);
},