leotaku / tower-livereload

Tower middleware to automatically reload your web browser during development
Apache License 2.0
59 stars 5 forks source link

fix: introduce timeout to abort back_up request #10

Closed definitelycarter closed 5 months ago

definitelycarter commented 5 months ago

When developing behind inside a devcontainer, I noticed the fetch to the back_up hangs forever. This is due to the observation that the forwarded port in vscode does not get recycled when cargo-watch restarts the process.

image

This PR resolves the above issue by introducing a timeout that aborts the back_up request after 500ms and retries the request after the specified interval.

image

definitelycarter commented 5 months ago

I just realized #8 also fixes this issue. Feel free to decline this one if you'd like.

leotaku commented 5 months ago

As you have said, #8, which I have just merged, solves this problem. In any case, thanks for showing initiative and trying to improve the project.