This commit is contained in:
Lamp 2018-11-29 12:50:08 -08:00 committed by GitHub
parent 748f0232d8
commit bf84ec2df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ Client.prototype.connect = function() {
clearInterval(self.pingInterval);
clearInterval(self.noteFlushInterval);
self.emit("disconnect");
self.emit("disconnect", evt);
self.emit("status", "Offline mode");
// reconnect!
@ -112,7 +112,7 @@ Client.prototype.connect = function() {
});
this.ws.addEventListener("error", function(error) {
self.emit("error", error);
self.ws.emit("close");
self.ws.emit("close", error);
});
this.ws.addEventListener("open", function(evt) {
self.connectionTime = Date.now();