Don't take a connection when dying
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 26 Mar 2008 11:57:44 +0000 (11:57 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 26 Mar 2008 11:57:44 +0000 (11:57 +0000)
org.glite.lbjp-common.server-bones/src/srvbones.c

index ed052ee..cfea0c2 100644 (file)
@@ -530,7 +530,7 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock)
                                kick_client = KICK_IDLE;
                }
 
-               if ( (conn < 0 || !first_request) && FD_ISSET(sock, &fds) && req_cnt < set_slave_reqs_max )
+               if ( !die && (conn < 0 || !first_request) && FD_ISSET(sock, &fds) && req_cnt < set_slave_reqs_max )
                {
                        /* Prefer slaves with no connection, then kick idle clients,
                         * active ones last. Wait less if we have serviced a request in the meantime.