diff --git a/bouncer.js b/bouncer.js index 44e72c4..daf38a7 100644 --- a/bouncer.js +++ b/bouncer.js @@ -130,6 +130,11 @@ module.exports = (ws, req) => { // Let the garbage collector do the thing. No need to add ws.reconnectTimeout.delete(i); } + for (i of ws.subs) { + direct_bc(["CLOSE", i[0]], ws.id); + cache_bc(["CLOSE", i[0]], ws.id); + } + onClientDisconnect(); });