proxy: Reduce the reconnect cooldown from 15 seconds to 3.
Exponential backoff would be better, but that's OK
This commit is contained in:
@@ -697,6 +697,7 @@ void proxy_session( struct proxier* proxy )
|
|||||||
|
|
||||||
if ( connect_to_upstream_cooldown ) {
|
if ( connect_to_upstream_cooldown ) {
|
||||||
connect_to_upstream_cooldown = 0;
|
connect_to_upstream_cooldown = 0;
|
||||||
|
select_timeout.tv_sec = 3;
|
||||||
} else {
|
} else {
|
||||||
proxy_start_connect_to_upstream( proxy );
|
proxy_start_connect_to_upstream( proxy );
|
||||||
|
|
||||||
@@ -705,10 +706,8 @@ void proxy_session( struct proxier* proxy )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
FD_SET( proxy->upstream_fd, &wfds );
|
FD_SET( proxy->upstream_fd, &wfds );
|
||||||
|
select_timeout.tv_sec = 15;
|
||||||
}
|
}
|
||||||
/* non-blocking connect() or a simple sleep */
|
|
||||||
select_timeout.tv_sec = 15;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case READ_INIT_FROM_UPSTREAM:
|
case READ_INIT_FROM_UPSTREAM:
|
||||||
case READ_FROM_UPSTREAM:
|
case READ_FROM_UPSTREAM:
|
||||||
|
Reference in New Issue
Block a user