Max RTO of 1 s
This commit is contained in:
@@ -312,6 +312,8 @@ uint64_t Connection::timeout( void )
|
|||||||
uint64_t RTO = lrint( ceil( SRTT + 4 * RTTVAR ) );
|
uint64_t RTO = lrint( ceil( SRTT + 4 * RTTVAR ) );
|
||||||
if ( RTO < MIN_RTO ) {
|
if ( RTO < MIN_RTO ) {
|
||||||
RTO = MIN_RTO;
|
RTO = MIN_RTO;
|
||||||
|
} else if ( RTO > MAX_RTO ) {
|
||||||
|
RTO = MAX_RTO;
|
||||||
}
|
}
|
||||||
return RTO;
|
return RTO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ namespace Network {
|
|||||||
private:
|
private:
|
||||||
static const int RECEIVE_MTU = 2048;
|
static const int RECEIVE_MTU = 2048;
|
||||||
static const uint64_t MIN_RTO = 50; /* ms */
|
static const uint64_t MIN_RTO = 50; /* ms */
|
||||||
|
static const uint64_t MAX_RTO = 1000; /* ms */
|
||||||
|
|
||||||
int sock;
|
int sock;
|
||||||
struct sockaddr_in remote_addr;
|
struct sockaddr_in remote_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user