diff --git a/protocol.c b/protocol.c index 5e93b63..26ffc9d 100644 --- a/protocol.c +++ b/protocol.c @@ -1466,7 +1466,7 @@ enet_protocol_check_outgoing_commands (ENetHost * host, ENetPeer * peer) if (outgoingCommand -> roundTripTimeout == 0) { - outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * peer -> roundTripTimeVariance; + outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * ENET_MAX (1, peer -> roundTripTimeVariance); outgoingCommand -> roundTripTimeoutLimit = peer -> timeoutLimit * outgoingCommand -> roundTripTimeout; }