kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 61863bfd3a45234ef2e86955f8af5e74e0d3e2ab
parent a0c203f507cbade96f27929819ccc7d68294beb9
Author: Joris Vink <joris@coders.se>
Date:   Mon,  4 Mar 2019 16:37:25 +0100

kill recv() timer if we have data.

also reset any exception that is set when we have successfully
read data from a socket.

Diffstat:
src/python.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -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);