✨ Fully rewrite relay
This commit is contained in:
parent
190e38dfc1
commit
20ffbd4c6d
47 changed files with 3489 additions and 128 deletions
15
src/commands/close.ts
Normal file
15
src/commands/close.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import type { UserConnection } from '../UserConnection.ts';
|
||||
import { log } from '../utils/logs.ts';
|
||||
|
||||
export function handleClose(
|
||||
connection: UserConnection,
|
||||
subscriptionId: string,
|
||||
) {
|
||||
if (!connection.subscriptions.has(subscriptionId)) {
|
||||
return log.warn(
|
||||
`Closing unknown subscription? That's weird. Subscription ID: ${subscriptionId}`,
|
||||
);
|
||||
}
|
||||
|
||||
connection.subscriptions.delete(subscriptionId);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue