Hi,
 
file: jk_connect.c
in jk_shutdown_socket(); when reading data from tomcat in the while loop,
the variable ttl is incremented every time by one, until breaking out of the 
loop:
snippet: 
line 505 *-------------------------
    /* Read all data from the peer until we reach "end-of-file" (FIN
     * from peer) or we've exceeded our overall timeout. If the client does
     * not send us bytes within12 second, close the connection.
     */
    while (1) {
        nbytes = jk_tcp_socket_recvfull(s, dummy, sizeof(dummy));
        if (nbytes <= 0)
            break;
        ttl += SECONDS_TO_LINGER;
        if (ttl > MAX_SECS_TO_LINGER)
            break;
    
    }
end *----------------------
 
I don't see any linger time happening when calling recv(), in fact it returns 
immediately,
therefore the while will loop 16 times maximum instead of 16 seconds. This is 
causing
a problem on NetWare, where I have a socket still trying to send data for few 
more loops.
It will then cause an IO exception in Java.
Removing the break based on the number of loop fixes my problem.
Is the problem present for all platforms or this is only because of our
implementation of winsock?
The same code in apache ap_lingering_close() does not seem to cause problems, 
at least reported ones.
 
Thank you very much,
 
Jean-Jacques
 
 

Reply via email to