You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kevin Seguin <se...@motive.com> on 2001/02/26 21:55:55 UTC

[PATCH] patch for jk_connect.c

environment:
-----------
solaris 2.6
apache 1.3.14
tomcat 3.2

the problem:
-----------
intermittent failures in function jk_open_socket in file jk_connect.c.  

example log messages:

[jk_ajp12_worker.c (129)]: Into jk_endpoint_t::service
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (149)]: jk_open_socket, socket() failed errno = 13
[jk_ajp12_worker.c (142)]: In jk_endpoint_t::service, sd = -1
[jk_ajp12_worker.c (173)]: In jk_endpoint_t::service, Error sd = -1
[jk_ajp12_worker.c (184)]: Into jk_endpoint_t::done

jk_open_socket thinks that the call to socket() is failing when socket()
returns 0 as the socket descriptor.  however, 0 is a perfectly valid
socket descriptor.  my assumption is that apache is closing stdin
somewhere.

the fix:
-------
change

    if(sock > 0) {

to 

    if(sock > -1) {