summaryrefslogtreecommitdiff
path: root/src/network/connectionthreads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/connectionthreads.cpp')
-rw-r--r--src/network/connectionthreads.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/connectionthreads.cpp b/src/network/connectionthreads.cpp
index 28ed798d9..7b62bc792 100644
--- a/src/network/connectionthreads.cpp
+++ b/src/network/connectionthreads.cpp
@@ -956,8 +956,11 @@ void ConnectionReceiveThread::receive(SharedBuffer<u8> &packetdata,
// command was sent reliably.
}
- /* The peer was not found in our lists. Add it. */
if (peer_id == PEER_ID_INEXISTENT) {
+ /* Ignore it if we are a client */
+ if (m_connection->ConnectedToServer())
+ return;
+ /* The peer was not found in our lists. Add it. */
peer_id = m_connection->createPeer(sender, MTP_MINETEST_RELIABLE_UDP, 0);
}