mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
kill recv() timer if we have data.
also reset any exception that is set when we have successfully read data from a socket.
This commit is contained in:
parent
a0c203f507
commit
61863bfd3a
@ -2117,6 +2117,14 @@ pysocket_async_recv(struct pysocket_op *op)
|
||||
break;
|
||||
}
|
||||
|
||||
op->data.coro->exception = NULL;
|
||||
op->data.coro->exception_msg = NULL;
|
||||
|
||||
if (op->data.timer != NULL) {
|
||||
kore_timer_remove(op->data.timer);
|
||||
op->data.timer = NULL;
|
||||
}
|
||||
|
||||
if (op->data.type == PYSOCKET_TYPE_RECV && ret == 0) {
|
||||
PyErr_SetNone(PyExc_StopIteration);
|
||||
return (NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user