If the idletimer expires for SPDY sessions use spdy_session_teardown()

to remove it gently.
This commit is contained in:
Joris Vink 2013-07-13 20:29:29 +02:00
parent c999bf5001
commit 94737a2a5f
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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