-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚑️ fix: closing websocket requires reason
- Loading branch information
1 parent
e504976
commit e3e3c73
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -465,7 +465,7 @@ export class Gateway extends HarmonyEventEmitter<GatewayTypedEvents> { | |
await this.cache.delete(`seq_${this.shards?.join('-') ?? '0'}`) | ||
} | ||
|
||
this.closeGateway(3999) | ||
this.closeGateway(RECONNECT_CODE, 'Reconnecting...') | ||
this.initWebsocket() | ||
} | ||
|
||
|
@@ -494,7 +494,7 @@ export class Gateway extends HarmonyEventEmitter<GatewayTypedEvents> { | |
reason !== undefined && reason !== '' ? ` and reason ${reason}` : '' | ||
}` | ||
) | ||
return this.websocket?.close(code, reason) | ||
this.websocket?.close(code, reason) | ||
} | ||
|
||
// Alias for backward compat, since [email protected] removed close again... | ||
|