mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
only bail out of sending on a timeout if there really is an event to dispatch
This commit is contained in:
parent
70d0d8f25d
commit
27d8c07142
1 changed files with 6 additions and 1 deletions
|
@ -1548,7 +1548,12 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
|
|||
! enet_list_empty (& currentPeer -> sentReliableCommands) &&
|
||||
ENET_TIME_GREATER_EQUAL (host -> serviceTime, currentPeer -> nextTimeout) &&
|
||||
enet_protocol_check_timeouts (host, currentPeer, event) == 1)
|
||||
return 1;
|
||||
{
|
||||
if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE)
|
||||
return 1;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((enet_list_empty (& currentPeer -> outgoingReliableCommands) ||
|
||||
enet_protocol_send_reliable_outgoing_commands (host, currentPeer)) &&
|
||||
|
|
Loading…
Reference in a new issue