HMR gets stuck when frontend is connected to SSE endpoint using PubSub/Stream
hey, I'm still kinda new to Effect and I tried looking for a solution for a while (here, on the docs and in the effect repo) but I couldnt figure this one out
I think the solution is probably to use the
saving a backend file (which triggers the restart) doesnt work when FE is connected in SSE; tho whenever the tab is closed the process resume as expected
https://github.com/astahmer/effect-repro-sse
- then visit http://localhost:5173/
- then try saving any src file in the backend folder, ex:
./back/src/http/demo.live.ts
- see the issue ("Waiting for graceful termination...")
-> commenting line 9 of ./front/src/App.tsx fixes the
issue:
I think the solution is probably to use the
PubSub.shutdown (or awaitShutdown ?) in a finalizer somewhere, but even after adding those in different places I couldnt get it working :(Issue
saving a backend file (which triggers the restart) doesnt work when FE is connected in SSE; tho whenever the tab is closed the process resume as expected
Steps to minimal reproduction
https://github.com/astahmer/effect-repro-sse
- then visit http://localhost:5173/
- then try saving any src file in the backend folder, ex:
./back/src/http/demo.live.ts
- see the issue ("Waiting for graceful termination...")
-> commenting line 9 of ./front/src/App.tsx fixes the
issue:
GitHub
Contribute to astahmer/effect-repro-sse development by creating an account on GitHub.
