why does the garbage collector is not cleaning up connections when we open new connection before closing the previous connection?
# Production Postmortem: Unreleased WebSocket Connections Preventing Garbage ## A JavaScript WebSocket implementation was leaking connections because new connections were created without closing existing ones. Overwriting the reference to the old connection did not automatically trigger garbage collection or socket cleanup, leading to resource exhaustion. ## Root – The `ws` variable was reassigned to a … Read more