session: allow transport cleanup only if not deleted 37/23037/2
authorFlorin Coras <fcoras@cisco.com>
Mon, 28 Oct 2019 15:46:37 +0000 (08:46 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 28 Oct 2019 16:58:58 +0000 (16:58 +0000)
Type: fix

Change-Id: I51282182952a66be698226bace39626df4d67b9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/session/session.c

index aff2cce..1189d53 100644 (file)
@@ -1282,8 +1282,9 @@ session_transport_cleanup (session_t * s)
 {
   /* Delete from main lookup table before we axe the the transport */
   session_lookup_del_session (s);
-  transport_cleanup (session_get_transport_proto (s), s->connection_index,
-                    s->thread_index);
+  if (s->session_state != SESSION_STATE_TRANSPORT_DELETED)
+    transport_cleanup (session_get_transport_proto (s), s->connection_index,
+                      s->thread_index);
   /* Since we called cleanup, no delete notification will come. So, make
    * sure the session is properly freed. */
   session_free_w_fifos (s);