Skip to content

Commit

Permalink
remove close connection
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Feb 14, 2024
1 parent ad59697 commit d5f5426
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/connection/connection-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { SocketConnection } from "./socket-connection.js";
export interface ConnectionManager {
/** connect handler used for the `WebSockets` `'connection'` event. */
connect(socket: WebSocket, request?: IncomingMessage): Promise<void>;
/** cleans up handlers associated with the `WebSocket` connection */
close(socket:WebSocket): Promise<void>;
/** closes all of the connections */
closeAll(): Promise<void>
}
Expand All @@ -34,12 +32,6 @@ export class InMemoryConnectionManager implements ConnectionManager {
});
}

async close(socket: WebSocket): Promise<void> {
const connection = this.connections.get(socket);
this.connections.delete(socket);
await connection.close();
}

async closeAll(): Promise<void> {
const closePromises = [];
this.connections.forEach(connection => closePromises.push(connection.close()));
Expand Down

0 comments on commit d5f5426

Please sign in to comment.