diff -r 32ebd1846d07 Modules/socketmodule.c --- a/Modules/socketmodule.c Fri Jul 26 15:54:07 2013 +0200 +++ b/Modules/socketmodule.c Fri Jul 26 23:16:46 2013 +0200 @@ -2031,6 +2031,9 @@ sock_accept(PySocketSockObject *s) } Py_END_ALLOW_THREADS + if (!timeout) + break; + if (timeout == 1) { PyErr_SetString(socket_timeout, "timed out"); return NULL;