Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
src/network/connection.h: Fix race condition
- Loading branch information
Showing
with
5 additions
and
1 deletion.
-
+5
−1
src/network/connection.h
|
@@ -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; |
|
|