Limit RTO to 2x RTT and fix early peer timeout expiration

This commit is contained in:
Cameron Gutman committed 2021-05-14 20:44:19 -05:00
1 parent a1a150c300
commit 132833deeb
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1127,8 +1127,8 @@ int startControlStream(void) {
// Ensure the connect verify ACK is sent immediately
enet_host_flush(client);
// Set the max peer timeout to 10 seconds
enet_peer_timeout(peer, ENET_PEER_TIMEOUT_LIMIT, ENET_PEER_TIMEOUT_MINIMUM, 10000);
// Set the peer timeout to 10 seconds and limit backoff to 2x RTT
enet_peer_timeout(peer, 2, 10000, 10000);
}
else {
ctlSock = connectTcpSocket(&RemoteAddr, RemoteAddrLen,