When rendering SSR page after recompilation, and having the web page open trying to reconnect the web socket, if the rendering takes 1sec or longer, the connect/disconnect goes into a loop for a long time.
Steps To Reproduce
Make a server function call with use_server_future that takes more than 1 second to complete. When hot reload tries to reconnect over web socket, it times out before the rendering gets done, and tries to reconnect.
Even doing forced refresh in the browser doesn't break the loop.
This doesn't happen if the call takes less than 1sec.
Expected behavior
Should reconnect normally.
Screenshots
Environment:
Dioxus version: 0.5.0 alpha0
Rust version: 1.76
OS info: Win11, WSL2
App platform: fullstack
Questionnaire
[ ] I'm interested in fixing this myself but don't know where to start
[ ] I would like to fix and I have a solution
[ ] I don't have time to fix this right now, but maybe later
This could be fixed by introducing some backoff in the reconnect delay.
This looks like the same issue as https://github.com/DioxusLabs/dioxus/issues/2032. You can follow that issue for more updates. We shouldn't be running server functions on any routes that do not return HTML
Problem
When rendering SSR page after recompilation, and having the web page open trying to reconnect the web socket, if the rendering takes 1sec or longer, the connect/disconnect goes into a loop for a long time.
Steps To Reproduce
Make a server function call with
use_server_future
that takes more than 1 second to complete. When hot reload tries to reconnect over web socket, it times out before the rendering gets done, and tries to reconnect.Even doing forced refresh in the browser doesn't break the loop.
This doesn't happen if the call takes less than 1sec.
Expected behavior
Should reconnect normally.
Screenshots
Environment:
Questionnaire
This could be fixed by introducing some backoff in the reconnect delay.