mturk 2002/11/07 08:46:28 Modified: jk/native2/common jk_channel_socket.c Log: There is no need to set the socket to the blocking mode, cause it is already created as such by default. Revision Changes Path 1.44 +10 -4 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Index: jk_channel_socket.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- jk_channel_socket.c 7 Nov 2002 15:31:01 -0000 1.43 +++ jk_channel_socket.c 7 Nov 2002 16:46:28 -0000 1.44 @@ -71,9 +71,6 @@ * @author: Costin Manolache */ -/* affects include files on Solaris (for FIONBIO on Solaris 8) */ -#define BSD_COMP - #include "jk_map.h" #include "jk_env.h" #include "jk_channel.h" @@ -303,6 +300,15 @@ if (ntimeout >= 0) { /* convert from seconds to ms */ int set = ntimeout * 1000; + +/* When a socket is created, it operates in blocking mode + * by default (nonblocking mode is disabled), so there is no need + * to set it to the blocking mode prior timeout setting. + * This is consistent with BSD sockets. + * + * XXX: How to check the timeouts effectively? +*/ +#if 0 u_long zero = 0; #ifdef WIN32 if (ioctlsocket(sock, FIONBIO, &zero) == SOCKET_ERROR) { @@ -315,7 +321,7 @@ socketInfo->host, socketInfo->port, errno, strerror( errno ) ); return JK_ERR; } - +#endif setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *) &set, sizeof(set)); setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (char *) &set, sizeof(set)); }
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>