[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Be smarter about catching socket errors on connect



Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv29235/src

Modified Files:
	tls.c 
Log Message:
Be smarter about catching socket errors on connect

Index: tls.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/tls.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- tls.c	8 Jan 2003 08:09:09 -0000	1.12
+++ tls.c	10 Jan 2003 16:51:04 -0000	1.13
@@ -344,9 +344,11 @@
         Py_BEGIN_ALLOW_THREADS
         r = SSL_connect(ssl);
         Py_END_ALLOW_THREADS
-        err = SSL_get_error(ssl,r);
-        if (tls_error(ssl, r, 0))
+        if (r <= 0) {
+                err = SSL_get_error(ssl,r);
+                tls_error(ssl, r, 0);
                 return NULL;
+        }
 
         Py_INCREF(Py_None);
         return Py_None;