https://gitlab.synchro.net/main/sbbs/-/commit/7b9c37f55f2dffb461610ac2
Modified Files:
exec/broker.js
Log Message:
broker.js: fix memory leaks from subscription references
Subscription.remove() used topics[i][this.client_id] instead of topics[i].subscribers[this.conn.client_id] — the same property-path
bug fixed in the constructor (a8a6bfebe). Subscriptions were never
actually removed from Topic subscriber maps, keeping Connection
objects alive through circular references indefinitely.
Added removeAllSubscriptions() method and call it from:
- tearDown() when session_expiry is 0 (no session persistence)
- expireSession() before deleting from broker.disconnected
- handleCONNECT when clean_start replaces an old connection
Also clean up empty subscriber entries from topic maps after the
last subscription for a client is removed.
Co-Authored-By: Claude Opus 4.6 (1M context) <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)