Skip to content

Commit a21a3fc

Browse files
committed
fix(websocket/session): subscription leak on close
1 parent 81b6bd6 commit a21a3fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/placeos-rest-api/websocket/session.cr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ module PlaceOS::Api::WebSocket
449449
cache_cleaner.try &.cancel
450450
clear_caches
451451

452-
# Unbind all modules
452+
# Unbind all modules — release the shared subscriptions
453+
bindings.each_value { |subscription| self.class.subscriptions.unsubscribe(subscription) }
453454
bindings.clear
454455

455456
# Ignore (stop debugging) all modules

0 commit comments

Comments
 (0)