1
0
Fork 0

(svn r23752) -Fix [FS#4938]: missing locking causing crash is extreme case when being in the MP lobby

release/1.2
rubidium 2012-01-04 22:11:26 +00:00
parent 531e501b5a
commit c530450193
1 changed files with 4 additions and 0 deletions

View File

@ -678,6 +678,8 @@ void NetworkUDPClose()
/** Receive the UDP packets. */
void NetworkBackgroundUDPLoop()
{
_network_udp_mutex->BeginCritical();
if (_network_udp_server) {
_udp_server_socket->ReceivePackets();
_udp_master_socket->ReceivePackets();
@ -685,6 +687,8 @@ void NetworkBackgroundUDPLoop()
_udp_client_socket->ReceivePackets();
if (_network_udp_broadcast > 0) _network_udp_broadcast--;
}
_network_udp_mutex->EndCritical();
}
#endif /* ENABLE_NETWORK */