"first_request" check is wrong when there is no connection.
authorZdeněk Salvet <salvet@ics.muni.cz>
Tue, 14 Feb 2006 07:39:38 +0000 (07:39 +0000)
committerZdeněk Salvet <salvet@ics.muni.cz>
Tue, 14 Feb 2006 07:39:38 +0000 (07:39 +0000)
Fixes bug #14965.

org.glite.lb.server-bones/src/srvbones.c

index 179cb4e..7e70e3b 100644 (file)
@@ -430,7 +430,7 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock)
                        }
                }
 
-               if ( !first_request && FD_ISSET(sock, &fds) && req_cnt < set_slave_reqs_max )
+               if ( (conn < 0 || !first_request) && FD_ISSET(sock, &fds) && req_cnt < set_slave_reqs_max )
                {
                        if ( conn >= 0 ) usleep(100000 + 1000 * (random() % 200));
                        if ( do_recvmsg(sock, &newconn, &seq, &newsrv) ) switch ( errno )