commit: r1862 - neon/trunk/src

joe at manyfish.co.uk joe at manyfish.co.uk
Mon Oct 3 17:48:59 EDT 2011


Author: joe
Date: Mon Oct  3 21:48:59 2011
New Revision: 1862

Modified:
   neon/trunk/src/ne_socket.c

Log:
* src/ne_socket.c (timed_connect): Don't overwrite an error when
  resetting fd flags.


Modified: neon/trunk/src/ne_socket.c
==============================================================================
--- neon/trunk/src/ne_socket.c	(original)
+++ neon/trunk/src/ne_socket.c	Mon Oct  3 21:48:59 2011
@@ -1251,11 +1251,11 @@
             }
         }
         
-        /* Reset to old flags: */
-        if (fcntl(fd, F_SETFL, flags) == -1) {
+        /* Reset to old flags; fail on error if no previous error. */
+        if (fcntl(fd, F_SETFL, flags) == -1 && !ret) {
             set_strerror(sock, errno);
             ret = NE_SOCK_ERROR;
-        }       
+        }
     } else 
 #endif /* USE_NONBLOCKING_CONNECT */
     {



More information about the neon-commits mailing list