mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
feat(apis/websocket): clear old client sessions and instances
This commit is contained in:
@@ -26,10 +26,14 @@ enum DisconnectReason {
|
||||
* The receiving end didn't have an open socket
|
||||
*/
|
||||
NoOpenSocket = 4003,
|
||||
/**
|
||||
* The client connected from another location
|
||||
*/
|
||||
NewConnection = 4004,
|
||||
/**
|
||||
* The client was not ready in time (**CLIENT-ONLY**)
|
||||
*/
|
||||
TooSlow = 4002,
|
||||
TooSlow = 4012,
|
||||
}
|
||||
|
||||
export default DisconnectReason
|
||||
|
||||
@@ -12,6 +12,7 @@ const HumanizedDisconnectReason = {
|
||||
[DisconnectReason.TooSlow]: 'the client was not ready in time',
|
||||
[DisconnectReason.PlannedDisconnect]: 'the client has disconnected on its own',
|
||||
[DisconnectReason.NoOpenSocket]: 'the receiving end did not have an open socket',
|
||||
[DisconnectReason.NewConnection]: 'the client connected from another location',
|
||||
} as const satisfies Record<DisconnectReason | number, string>
|
||||
|
||||
export default HumanizedDisconnectReason
|
||||
|
||||
Reference in New Issue
Block a user