diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp index 6aaea1f1c71..bdd82fca506 100644 --- a/modules/multiplayer/scene_multiplayer.cpp +++ b/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); }