There shouldn't be a reason to call connect again in the chunk
below since apr_wait_io_or_timeout should return success if we can
use the socket or error if we've timeout.
barbee.
Index: sockets.c
===================================================================
RCS file: /home/cvspublic/apr/network_io/unix/sockets.c,v
retrieving revision 1.83
diff -u -a -r1.83 sockets.c
--- sockets.c 2001/07/18 16:51:48 1.83
+++ sockets.c 2001/08/06 20:32:28
@@ -273,16 +273,9 @@
* socket; if called again, we can see EALREADY
*/
if (rc == -1 && (errno == EINPROGRESS || errno == EALREADY) &&
sock->timeou
t != 0) {
- apr_status_t arv = apr_wait_for_io_or_timeout(sock, 0);
- if (arv != APR_SUCCESS) {
- return arv;
- }
- else {
- do {
- rc = connect(sock->socketdes,
- (const struct sockaddr *)&sa->sa.sin,
- sa->salen);
- } while (rc == -1 && errno == EINTR);
+ rc = apr_wait_for_io_or_timeout(sock, 0);
+ if (rc != APR_SUCCESS) {
+ return rc;
}
}