Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: "Search LAN games" used the socket after it was closed #9437

Merged
merged 1 commit into from Jul 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/network/network.cpp
Expand Up @@ -615,7 +615,6 @@ void NetworkClose(bool close_admins)
static void NetworkInitialize(bool close_admins = true)
{
InitializeNetworkPools(close_admins);
NetworkUDPInitialize();

_sync_frame = 0;
_network_first_time = true;
Expand Down Expand Up @@ -907,6 +906,7 @@ bool NetworkServerStart()

NetworkDisconnect(false, false);
NetworkInitialize(false);
NetworkUDPInitialize();
Debug(net, 5, "Starting listeners for clients");
if (!ServerNetworkGameSocketHandler::Listen(_settings_client.network.server_port)) return false;

Expand Down Expand Up @@ -1292,6 +1292,7 @@ void NetworkStartUp()
_network_game_info = {};

NetworkInitialize();
NetworkUDPInitialize();
Debug(net, 3, "Network online, multiplayer available");
NetworkFindBroadcastIPs(&_broadcast_list);
}
Expand Down