Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notificationClient: Establish ws connection only on client render
The current websocket configuration, creates a new websocket client, for every SSR generated page. Since those clients are technically active, they are never cleaned up, thus resulting in memory leak. This change makes it so, a new web socket connection is created only on first render of the component. Tests: 1. Start visiting different pages randomly 2. Observe the current websocket clients, in the Socket object. They can be found in Socket.adapters.sids 3. The size of sids should remain 1, per browser window
- Loading branch information