Browse Source

Fix removing connected peer during disconnection

(cherry picked from commit bd8380db5534af18fb4fab76daac77ef420becb4)
Max Hilbrunner 1 year ago
parent
commit
3e908bfef3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/multiplayer/scene_multiplayer.cpp

+ 1 - 1
modules/multiplayer/scene_multiplayer.cpp

@@ -428,7 +428,7 @@ void SceneMultiplayer::disconnect_peer(int p_id) {
 	if (pending_peers.has(p_id)) {
 		pending_peers.erase(p_id);
 	} else if (connected_peers.has(p_id)) {
-		connected_peers.has(p_id);
+		connected_peers.erase(p_id);
 	}
 	multiplayer_peer->disconnect_peer(p_id);
 }