Prevent indefinite wait if CONNECT_DELAY is set to zero
set_server_bits() now returns -1 for "no timeout", so 0 is a legitimate return value. io() should only update real_timeout from server_timeout if server_timeout is not -1 (real_timeout == -1 ends up meaning "wait indefinitely"). Note that if you set CONNECT_DELAY to zero you get a lag check ping sent off first thing in the server connection, this should be fixed.
This commit is contained in:
@@ -230,7 +230,7 @@ void close_unattached_servers(void)
|
||||
long set_server_bits (fd_set *rd, fd_set *wr)
|
||||
{
|
||||
int i;
|
||||
long timeout = 0;
|
||||
long timeout = -1;
|
||||
|
||||
for (i = 0; i < number_of_servers; i++)
|
||||
{
|
||||
@@ -240,8 +240,6 @@ long set_server_bits (fd_set *rd, fd_set *wr)
|
||||
* return in milliseconds.
|
||||
*/
|
||||
timeout = get_int_var(CONNECT_DELAY_VAR)*1000;
|
||||
if(!timeout)
|
||||
timeout = -1;
|
||||
}
|
||||
|
||||
if (server_list[i].read > -1)
|
||||
|
||||
Reference in New Issue
Block a user