From 9cd1ca18610aa838b2938c4790db8a1d89d5c4f3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 26 Aug 2023 15:57:51 -0500 Subject: [PATCH] streaming: don't forget to close the subscription when the socket closes --- src/controllers/api/streaming.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/api/streaming.ts b/src/controllers/api/streaming.ts index 8b655f97..1c852592 100644 --- a/src/controllers/api/streaming.ts +++ b/src/controllers/api/streaming.ts @@ -61,6 +61,7 @@ const streamingController: AppController = (c) => { socket.onclose = () => { ws.unsubscribeAll(socket); + Sub.close(socket); }; return response;