Max RTO of 1 s

This commit is contained in:
Keith Winstein
2011-09-13 01:02:22 -04:00
parent a24443638b
commit 823dc58891
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -312,6 +312,8 @@ uint64_t Connection::timeout( void )
uint64_t RTO = lrint( ceil( SRTT + 4 * RTTVAR ) );
if ( RTO < MIN_RTO ) {
RTO = MIN_RTO;
} else if ( RTO > MAX_RTO ) {
RTO = MAX_RTO;
}
return RTO;
}
+1
View File
@@ -58,6 +58,7 @@ namespace Network {
private:
static const int RECEIVE_MTU = 2048;
static const uint64_t MIN_RTO = 50; /* ms */
static const uint64_t MAX_RTO = 1000; /* ms */
int sock;
struct sockaddr_in remote_addr;