From 94737a2a5f52d805cad9e36bf8bf5debbcaebb8b Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sat, 13 Jul 2013 20:29:29 +0200 Subject: [PATCH] If the idletimer expires for SPDY sessions use spdy_session_teardown() to remove it gently. --- src/connection.c | 5 ++++- src/spdy.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/connection.c b/src/connection.c index 16d727f..3f99fb7 100644 --- a/src/connection.c +++ b/src/connection.c @@ -225,7 +225,10 @@ kore_connection_check_idletimer(u_int64_t now, struct connection *c) d = now - c->idle_timer.start; if (d >= c->idle_timer.length) { kore_debug("%p idle for %d ms, expiring", c, d); - kore_connection_disconnect(c); + if (c->proto == CONN_PROTO_SPDY) + spdy_session_teardown(c, SPDY_SESSION_ERROR_OK); + else + kore_connection_disconnect(c); } } diff --git a/src/spdy.c b/src/spdy.c index 2db207f..5e076ad 100644 --- a/src/spdy.c +++ b/src/spdy.c @@ -341,8 +341,7 @@ spdy_session_teardown(struct connection *c, u_int8_t err) c->flags &= ~CONN_READ_POSSIBLE; c->flags |= CONN_READ_BLOCK; - c->idle_timer.length = 5000; - kore_connection_start_idletimer(c); + net_send_flush(c); } static int