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 0eab72f4cd62a06a58d0e90c18c2563d2944fd72
parent 068b295427700f889b6bfe3dd0975050868b89ee
Author: Joris Vink <joris@coders.se>
Date:   Sun,  3 Nov 2019 22:28:48 +0100

Only call http_check_timeout on established clients.

Diffstat:
src/connection.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/connection.c b/src/connection.c @@ -185,10 +185,12 @@ kore_connection_check_timeout(u_int64_t now) if (c->proto == CONN_PROTO_MSG) continue; #if !defined(KORE_NO_HTTP) - if (!http_check_timeout(c, now)) - continue; - if (!TAILQ_EMPTY(&c->http_requests)) - continue; + if (c->state == CONN_STATE_ESTABLISHED) { + if (!http_check_timeout(c, now)) + continue; + if (!TAILQ_EMPTY(&c->http_requests)) + continue; + } #endif if (c->flags & CONN_IDLE_TIMER_ACT) kore_connection_check_idletimer(now, c);