Merge pull request #10237 from AdmiralCurtiss/netplay-server-crash

NetPlayServer: Clear remaining m_players when netplay thread ends so that their destructors can run while the ENetHost still exists.
This commit is contained in:
Léo Lam 2021-11-21 22:04:12 +01:00 committed by GitHub
commit d5b917a6c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,8 @@ void NetPlayServer::ThreadFunc()
ClearPeerPlayerId(player_entry.second.socket);
enet_peer_disconnect(player_entry.second.socket, 0);
}
} // namespace NetPlay
m_players.clear();
}
static void SendSyncIdentifier(sf::Packet& spac, const SyncIdentifier& sync_identifier)
{