rbb         01/08/07 13:24:50

  Modified:    .        CHANGES
               network_io/unix sockets.c
  Log:
  Non-blocking connects shouldn't be calling connect a second
  time.  According to Single Unix, a non-blocking connect has
  succeeded when the select pops successfully.  It has failed
  if the select failed.  The second connect was causing 502's
  in the httpd-proxy.
  
  Submitted by: John Barbee [EMAIL PROTECTED]
  Reviewed by:  Ryan Bloom
  
  Revision  Changes    Path
  1.133     +6 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- CHANGES   2001/08/07 19:57:44     1.132
  +++ CHANGES   2001/08/07 20:24:50     1.133
  @@ -1,5 +1,11 @@
   Changes with APR b1  
   
  +  *) Non-blocking connects shouldn't be calling connect a second
  +     time.  According to Single Unix, a non-blocking connect has
  +     succeeded when the select pops successfully.  It has failed
  +     if the select failed.  The second connect was causing 502's
  +     in the httpd-proxy.  [John Barbee [EMAIL PROTECTED]
  +
     *) Fix apr_dir_rewind() for Win32 to avoid returning a bogus error.
        [Jeff Trawick, William Rowe]
   
  
  
  
  1.84      +3 -10     apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- sockets.c 2001/07/18 16:51:48     1.83
  +++ sockets.c 2001/08/07 20:24:50     1.84
  @@ -273,16 +273,9 @@
        * socket; if called again, we can see EALREADY
        */
       if (rc == -1 && (errno == EINPROGRESS || errno == EALREADY) && 
sock->timeout != 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;
           }
       }
   
  
  
  

Reply via email to