Network/ENetHost: Fix error when using ENetHost without listening

This commit is contained in:
Jérôme Leclercq 2017-09-01 15:24:42 +02:00
parent e37a7ad5fd
commit 5915b6ce3a
1 changed files with 3 additions and 1 deletions

View File

@ -237,7 +237,9 @@ namespace Nz
break;
}
if (!m_allowsIncomingConnections && m_connectedPeers == 0)
// Receiving on an unbound socket which has never sent data is an invalid operation
if (!m_allowsIncomingConnections && m_totalSentData == 0)
return 0;
switch (ReceiveIncomingCommands(event))
{