Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

[dev] Rust panics after inactivity "Connection reset without closing handshake" #1241

Closed
PierBover opened this issue May 4, 2020 · 4 comments · Fixed by #1276
Closed

[dev] Rust panics after inactivity "Connection reset without closing handshake" #1241

PierBover opened this issue May 4, 2020 · 4 comments · Fixed by #1276
Milestone

Comments

@PierBover
Copy link

🐛 Bug Report

I'm creating this bug as requested by @EverlastingBugstopper here: #1047 (comment)

After the computer goes to sleep or after the worker hasn't been used for some time (a couple of minutes) Rust panics and shows this error message:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Protocol("Connection reset without closing handshake")', src/commands/dev/socket.rs:36:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Environment

  • operating system: macOS 10.13.6
  • output of node -v: v12.16.1
  • output of wrangler -V: ✨ wrangler 1.9.0-rc.0

Steps to reproduce

Open a worker and put the computer to sleep or wait a couple of minutes without using the worker.

@EverlastingBugstopper
Copy link
Contributor

We'll need to figure out if we want to kill the process with a nicer error message here and document that we limit connections to x minutes, if we want to rengoatiate a new websocket connection after a certain period of time, or if we need the preview service to allow longer running sessions.

cc @ispivey - I think the issue here is that the preview service drops the connection after a certain length of time, regardless of whether or not the dev session is sending heartbeat messages.

@PierBover
Copy link
Author

rengoatiate a new websocket connection after a certain period of time

This sounds like it would provide the best user experience, no?

What annoys me the most personally is that I need to manually restart the worker very often.

@EverlastingBugstopper
Copy link
Contributor

Yup - I think issuing a reconnect here is probably the best choice :)

@EverlastingBugstopper
Copy link
Contributor

i've opened this issue to see if i can get some help/pointers on how to do this effectively

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants