forked from mirrors/kore
If fd is -1 in pysock_op_iternext just return None.
None in pysock signals EOF and if it was closed under our feet we should relay that properly.
This commit is contained in:
parent
370041656e
commit
58c2739dee
@ -2066,6 +2066,11 @@ pysocket_op_iternext(struct pysocket_op *op)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
if (op->socket->fd == -1) {
|
||||
PyErr_SetNone(PyExc_StopIteration);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (op->eof) {
|
||||
if (op->coro->exception != NULL) {
|
||||
PyErr_SetString(op->coro->exception,
|
||||
|
Loading…
Reference in New Issue
Block a user