Move the conex_finally label up, so that the errno value is always

returned.
This commit is contained in:
Guido van Rossum 2002-06-07 19:55:29 +00:00
parent 2a664a2a75
commit 1790e65d43

View File

@ -1462,6 +1462,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
Py_END_ALLOW_THREADS
}
conex_finally:
if (res != 0) {
#ifdef MS_WINDOWS
res = WSAGetLastError();
@ -1470,7 +1471,6 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
#endif
}
conex_finally:
return PyInt_FromLong((long) res);
}