From b4c8007d3b2082c757ae42008e915872c8ebe671 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 23 May 2017 22:24:50 +0200 Subject: proxy passed test; various bug fixes --- code/core/timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'code/core/timer.c') diff --git a/code/core/timer.c b/code/core/timer.c index cf77d6e..47a3b9d 100644 --- a/code/core/timer.c +++ b/code/core/timer.c @@ -184,12 +184,14 @@ unsigned int ecp_timer_exe(ECPSocket *sock) { ecp_conn_handler_msg_t *handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->msg[mtype] : NULL; if (to_exec[i].cnt) { + ssize_t _rv = 0; to_exec[i].cnt--; to_exec[i].abstime = now + to_exec[i].timeout; if (retry) { - rv = retry(conn, to_exec+i); + _rv = retry(conn, to_exec+i); + if (_rv < 0) rv = _rv; } else { - ssize_t _rv = ecp_pld_send(conn, pld, pld_size); + _rv = ecp_pld_send(conn, pld, pld_size); if (_rv < 0) rv = _rv; } if (!rv) rv = ecp_timer_push(to_exec+i); -- cgit v1.2.3