lucaspoffo / renet

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

Bug: client does not disconnect cleanly. #133

Closed UkoeHB closed 11 months ago

UkoeHB commented 11 months ago

After calling RenetClient::disconnect(), the method RenetClient::is_connecting() returns true.

lucaspoffo commented 11 months ago

Can you show a small example that replicates this behavior? I was not able to make a simple reproduction case, for example, this simple case is working:

let mut connection = RenetClient::new(ConnectionConfig::default());
assert!(connection.is_connecting());
connection.disconnect();
assert!(!connection.is_connecting());
UkoeHB commented 11 months ago

Oh I figured it out, I have a system that replaces the renet client on disconnect, so the new client is always is_connecting().