summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-14 11:28:43 -0800
committerDamjan Marion <dmarion@me.com>2018-12-17 08:47:39 +0000
commit3c7d4f9e1f54ec6627795b64525f182e2cda7490 (patch)
tree8d9ca4efe66a2f8f7cf56a3fe9c9d3b92561b26f /src/vnet/tcp
parent7bb27caf62f5fa942be68015aeb0543566d22371 (diff)
vcl/session: handle reset/disconnect before app accept
Also further improves reset handling. Change-Id: I6e517632f700f181761726b965134e0c217eb06d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 6d6a880eda8..a3cd1f3e1bb 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -359,10 +359,12 @@ tcp_connection_close (tcp_connection_t * tc)
TCP_EVT_DBG (TCP_EVT_STATE_CHANGE, tc);
- /* If in CLOSED and WAITCLOSE timer is not set, delete connection now */
+ /* If in CLOSED and WAITCLOSE timer is not set, delete connection.
+ * But instead of doing it now wait until next dispatch cycle to give
+ * the session layer a chance to clear unhandled events */
if (!tcp_timer_is_active (tc, TCP_TIMER_WAITCLOSE)
&& tc->state == TCP_STATE_CLOSED)
- tcp_connection_del (tc);
+ tcp_timer_update (tc, TCP_TIMER_WAITCLOSE, 1);
}
static void