mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 00:47:29 +01:00
src/network/connection.h: Fix race condition
This commit is contained in:
parent
c39a85a88d
commit
79e2647556
@ -1053,7 +1053,11 @@ protected:
|
||||
void PrintInfo(std::ostream &out);
|
||||
void PrintInfo();
|
||||
|
||||
std::list<u16> getPeerIDs() { return m_peer_ids; }
|
||||
std::list<u16> getPeerIDs()
|
||||
{
|
||||
JMutexAutoLock peerlock(m_peers_mutex);
|
||||
return m_peer_ids;
|
||||
}
|
||||
|
||||
UDPSocket m_udpSocket;
|
||||
MutexedQueue<ConnectionCommand> m_command_queue;
|
||||
|
Loading…
Reference in New Issue
Block a user