lucaspoffo / renet

Server/Client network library for multiplayer games with authentication and connection management made with Rust
Apache License 2.0
662 stars 68 forks source link

Two clients disconnecting without sending `client.disconnect()` breaks renet #68

Closed LatentSpaceExplorer closed 1 year ago

LatentSpaceExplorer commented 1 year ago

Renet breaks when two clients disconnect without using the proper client.disconnect() function and a new client subsequently connects. I have included a video demonstrating running the demo_bevy.

One potential cause of this issue could be that all of the clients and the host have the same IP address.

Important to note: I´m exiting the client with ctrl+C, witch causes the client to exit with sending client.disconnect().

https://user-images.githubusercontent.com/51098127/210580106-a30edbd8-76a5-4a96-8f00-8089bd771e8c.mp4

LatentSpaceExplorer commented 1 year ago

This is probably related to https://github.com/lucaspoffo/renet/issues/63#issue-1474803207

lucaspoffo commented 1 year ago

Fixed by https://github.com/lucaspoffo/renet/pull/82 Tested using Windows, doing the same steps as the GIF and no problem occurred