Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket server can crash out of event loops if connection un-gracefully severed #153

Closed
qdot opened this issue Sep 13, 2020 · 0 comments
Closed
Assignees
Labels
bug Connectors - Websocket Tasks/Bugs pertaining to the websocket connector module

Comments

@qdot
Copy link
Member

qdot commented Sep 13, 2020

Taken from intiface/intiface-cli-rs#5

--

After a few times closing + restarting some scripts, I noticed the Rust server would stop accepting connections if the connection was not closed gracefully too many times.

Steps to reproduce:

  1. Run Intiface's Rust server
  2. Run a script that connects to the server (e.g. the Python example)
  3. Terminate that script with Ctrl+C, or otherwise end it in a non-graceful way
  4. IntifaceCLI will display an error such as:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Protocol("Connection reset without closing handshake")', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/buttplug-0.7.2/src/connector/transport/websocket/websocket_server.rs:59:5
  1. Continue doing this several more times.
  2. After 5 or so attempts, the script will fail to connect to the server anymore.
Could not connect to server, exiting: [Errno 111] Connect call failed ('127.0.0.1', 12345)

The server appears to accept new connections if they are all closed gracefully, but not if they are non-graceful.

Expected behavior:

The server would continue to accept new connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Connectors - Websocket Tasks/Bugs pertaining to the websocket connector module
Projects
None yet
Development

No branches or pull requests

1 participant