Commit 1790e65d authored by Guido van Rossum's avatar Guido van Rossum

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

returned.
parent 2a664a2a
...@@ -1462,6 +1462,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro) ...@@ -1462,6 +1462,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
} }
conex_finally:
if (res != 0) { if (res != 0) {
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
res = WSAGetLastError(); res = WSAGetLastError();
...@@ -1470,7 +1471,6 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro) ...@@ -1470,7 +1471,6 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
#endif #endif
} }
conex_finally:
return PyInt_FromLong((long) res); return PyInt_FromLong((long) res);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment