tls: fix connection failures/interrupts at scale (VPP-1464)
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 23d258f..81c9306 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -814,18 +814,22 @@
* from the app, do the whole disconnect since we might still
* have lingering events */
stream_session_disconnect (s);
+ s->session_state = SESSION_STATE_CLOSED;
break;
case SESSION_STATE_CLOSING:
/* Cleanup lookup table. Transport needs to still be valid */
session_lookup_del_session (s);
+ s->session_state = SESSION_STATE_CLOSED;
break;
case SESSION_STATE_CLOSED:
case SESSION_STATE_ACCEPTING:
stream_session_delete (s);
break;
+ default:
+ /* Assume connection was not yet added the lookup table */
+ session_free_w_fifos (s);
+ break;
}
-
- s->session_state = SESSION_STATE_CLOSED;
}
/**