summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-28 08:46:37 -0700
committerFlorin Coras <florin.coras@gmail.com>2019-10-28 16:58:58 +0000
commit5afea129ed0c85f5313791d1d55fed6cdcc079c7 (patch)
treef771c7edb28839ace73cceb65a61803e69de3d3b
parent1afe95272672ae0ff42109a9a682907fd169973e (diff)
session: allow transport cleanup only if not deleted
Type: fix Change-Id: I51282182952a66be698226bace39626df4d67b9f Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/session/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index aff2cceaf14..1189d53b3cc 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -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);