From 4de13a2c2e98845f681c6e6221dc444877bd1cb7 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Fri, 13 Nov 2020 00:11:34 -0500 Subject: [PATCH] avoid sending packets in unacknowledged window --- protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol.c b/protocol.c index da5d618..9d654f1 100644 --- a/protocol.c +++ b/protocol.c @@ -1411,8 +1411,8 @@ enet_protocol_check_outgoing_commands (ENetHost * host, ENetPeer * peer) outgoingCommand -> sendAttempts < 1 && ! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) && (channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE || - channel -> usedReliableWindows & ((((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 1)) - 1) << reliableWindow) | - (((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 1)) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow))))) + channel -> usedReliableWindows & ((((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 2)) - 1) << reliableWindow) | + (((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 2)) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow))))) windowWrap = 1; if (windowWrap) {