summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-28 08:46:37 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-05 10:33:39 +0000
commitf0c4096e1bfa3fac4011831978a87975ae6aa3c6 (patch)
treee4f90c79f279b63bd6b36cded2387992119c0b7a /src
parent92a5fdd6849a2788ae42d7d09a6f2838413a9dfb (diff)
session: allow transport cleanup only if not deleted
Type: fix Change-Id: I51282182952a66be698226bace39626df4d67b9f Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 5afea129ed0c85f5313791d1d55fed6cdcc079c7)
Diffstat (limited to 'src')
-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 32d7914a607..97c9789f76f 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1281,8 +1281,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);