Skip to content
Snippets Groups Projects
Commit 79e26475 authored by Břetislav Štec's avatar Břetislav Štec Committed by est31
Browse files

src/network/connection.h: Fix race condition

parent c39a85a8
No related branches found
No related tags found
No related merge requests found
......@@ -1053,7 +1053,11 @@ class Connection
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment