mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
merge r68768 to py3k
This commit is contained in:
parent
7aedf11e57
commit
6214edd1bb
4 changed files with 33 additions and 3 deletions
|
@ -153,11 +153,23 @@ conn_recv_string(ConnectionObject *conn, char *buffer,
|
|||
*/
|
||||
|
||||
static int
|
||||
conn_poll(ConnectionObject *conn, double timeout)
|
||||
conn_poll(ConnectionObject *conn, double timeout, PyThreadState *_save)
|
||||
{
|
||||
int res;
|
||||
fd_set rfds;
|
||||
|
||||
/*
|
||||
* Verify the handle, issue 3321. Not required for windows.
|
||||
*/
|
||||
#ifndef MS_WINDOWS
|
||||
if (((int)conn->handle) < 0 || ((int)conn->handle) >= FD_SETSIZE) {
|
||||
Py_BLOCK_THREADS
|
||||
PyErr_SetString(PyExc_IOError, "handle out of range in select()");
|
||||
Py_UNBLOCK_THREADS
|
||||
return MP_EXCEPTION_HAS_BEEN_SET;
|
||||
}
|
||||
#endif
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
FD_SET((SOCKET)conn->handle, &rfds);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue