proxy: Reduce the reconnect cooldown from 15 seconds to 3.

Exponential backoff would be better, but that's OK
This commit is contained in:
nick
2013-06-20 10:26:34 +01:00
parent 89fd18f6f0
commit 81d41f567d

View File

@@ -697,6 +697,7 @@ void proxy_session( struct proxier* proxy )
if ( connect_to_upstream_cooldown ) {
connect_to_upstream_cooldown = 0;
select_timeout.tv_sec = 3;
} else {
proxy_start_connect_to_upstream( proxy );
@@ -705,10 +706,8 @@ void proxy_session( struct proxier* proxy )
continue;
}
FD_SET( proxy->upstream_fd, &wfds );
select_timeout.tv_sec = 15;
}
/* non-blocking connect() or a simple sleep */
select_timeout.tv_sec = 15;
break;
case READ_INIT_FROM_UPSTREAM:
case READ_FROM_UPSTREAM: