summaryrefslogtreecommitdiff
path: root/code/core/timer.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-05-23 22:24:50 +0200
committerUros Majstorovic <majstor@majstor.org>2017-05-23 22:24:50 +0200
commitb4c8007d3b2082c757ae42008e915872c8ebe671 (patch)
treecd218340840a0a05779703357742b0c2c92e1b6b /code/core/timer.c
parentab0325ae7906230f1ea82f08b27c72b075e9a13d (diff)
proxy passed test; various bug fixes
Diffstat (limited to 'code/core/timer.c')
-rw-r--r--code/core/timer.c6
1 files changed, 4 insertions, 2 deletions
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);