You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Something about how the nextjs hot reload injects changes into the running app causes websockets to leak when updates are applied quickly.
To Reproduce
Create a blank app and add some stateful component to enable the websocket.
Expected behavior
Expect that afterwards, only a single websocket connection to /_event is open.
Actually there are many websocket connections open for the tab, but only one seems to actually be active. The others are just hanging around, wasting resources.
Thankfully this doesn't seem to affect prod mode, because there is no hot-reload in prod.
Screenshots
Why are there 3 open connections to /_event?????
Specifics (please complete the following information):
Python Version: 3.12
Reflex Version: 0.6.7
OS: macOS
The text was updated successfully, but these errors were encountered:
masenf
changed the title
Multiple hot reloads in quick succession results in multiple websocket connections
Hot reloads in results in multiple websocket connections
Dec 20, 2024
masenf
changed the title
Hot reloads in results in multiple websocket connections
Hot reload results in multiple websocket connections
Dec 20, 2024
Describe the bug
Something about how the nextjs hot reload injects changes into the running app causes websockets to leak when updates are applied quickly.
To Reproduce
reflex run
the app in dev mode.Expected behavior
Expect that afterwards, only a single websocket connection to
/_event
is open.Actually there are many websocket connections open for the tab, but only one seems to actually be active. The others are just hanging around, wasting resources.
Thankfully this doesn't seem to affect prod mode, because there is no hot-reload in prod.
Screenshots
Why are there 3 open connections to
/_event
?????Specifics (please complete the following information):
The text was updated successfully, but these errors were encountered: