mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 00:33:59 +00:00
feat(packages/api): add force disconnecting and disconnected getter in APIClient
This commit is contained in:
@@ -137,8 +137,8 @@ export class ClientWebSocketManager {
|
||||
/**
|
||||
* Disconnects from the WebSocket API
|
||||
*/
|
||||
disconnect() {
|
||||
this.#throwIfDisconnected('Cannot disconnect when already disconnected from the server')
|
||||
disconnect(force?: boolean) {
|
||||
if (!force) this.#throwIfDisconnected('Cannot disconnect when already disconnected from the server')
|
||||
this._handleDisconnect(DisconnectReason.PlannedDisconnect)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user