remove timeout on connection open
This commit is contained in:
@ -126,12 +126,8 @@ export default class Connection {
|
||||
|
||||
OnOpen(e: Event) {
|
||||
this.ConnectTimeout = DefaultConnectTimeout;
|
||||
console.log(`[${this.Address}] Open!`);
|
||||
setTimeout(() => {
|
||||
if(this.Authed || this.AwaitingAuth.size === 0) {
|
||||
this._InitSubscriptions();
|
||||
}
|
||||
}, 150)
|
||||
console.log(`[${this.Address}] Open!`);
|
||||
}
|
||||
|
||||
OnClose(e: CloseEvent) {
|
||||
@ -349,6 +345,10 @@ export default class Connection {
|
||||
}
|
||||
|
||||
_SendJson(obj: any) {
|
||||
if(!this.Authed && this.AwaitingAuth.size > 0) {
|
||||
this.Pending.push(obj);
|
||||
return;
|
||||
}
|
||||
if (this.Socket?.readyState !== WebSocket.OPEN) {
|
||||
this.Pending.push(obj);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user