You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.socket.on("close", () => {
/* got rid of auto-disconnect status and emit here */
this.messageQueue.empty();
if (this.autoReconnect) {
this.status = "reconnecting"; /*this status is new.*/
this.emit('reconnecting'); /*this event is new.*/
setTimeout(
this.socket.open.bind(this.socket),
this.reconnectInterval
);
} else { /*this else block is new*/
this.status = "disconnected";
this.emit("disconnected");
}
});
Instead of this.status being binary, it should be ternary, including "connected", "disconnected", and "reconnecting". I am unsure if this goes against the DDP spec, but It would be nice to have.
The text was updated successfully, but these errors were encountered:
Just a suggestion,
Here's one thing I would change:
Instead of
this.status
being binary, it should be ternary, including "connected", "disconnected", and "reconnecting". I am unsure if this goes against the DDP spec, but It would be nice to have.The text was updated successfully, but these errors were encountered: