Skip to content
Permalink
Browse files

src/network/connection.h: Fix race condition

  • Loading branch information
t0suj4 authored and est31 committed Aug 1, 2015
1 parent c39a85a commit 79e2647556773d46cc0299e73ca23c41a153ff2a
Showing with 5 additions and 1 deletion.
  1. +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;

0 comments on commit 79e2647

Please sign in to comment.