* Evict the local socket.
(ws: WebSocket)
| 215 | * Evict the local socket. |
| 216 | */ |
| 217 | evictSocketFromMemory(ws: WebSocket): Promise<void> { |
| 218 | return this.unsubscribeFromAllChannels(ws, true).then(() => { |
| 219 | if (ws.app) { |
| 220 | this.server.adapter.removeSocket(ws.app.id, ws.id); |
| 221 | this.server.metricsManager.markDisconnection(ws); |
| 222 | } |
| 223 | |
| 224 | this.clearTimeout(ws); |
| 225 | }); |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Handle the event to close all existing sockets. |
no test coverage detected