Streaming: refactor, add unsubscribeAll method

This commit is contained in:
Alex Gleason
2023-05-20 20:23:01 -05:00
parent 3ffad1df29
commit ec5e0ed330
3 changed files with 96 additions and 37 deletions

View File

@@ -40,7 +40,7 @@ const streamingController: AppController = (c) => {
socket.addEventListener('close', () => {
console.log('websocket: connection closed');
ws.unsubscribe(conn, { name: stream! });
ws.unsubscribeAll(socket);
});
return response;