summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-27 07:55:46 -0800
committerDamjan Marion <dmarion@me.com>2019-03-01 11:51:53 +0000
commit2b81e3cba77e6427b47228318d55e40a859d02d1 (patch)
tree8034c15966f8fe40a87dbcddbbb67aa0864e9a7c /src/vnet/session/session.c
parent038243064ba0a6b587213ba56fffd9e3fddcf0ee (diff)
session: refactor local connects
- Switches local connects to cut-thru transport - Removes local sessions as a separate session type Change-Id: I997c6355d8c8e4f2110678f785b0f5d96bba47f7 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 110db2c2a4a..36aadcb7c40 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -123,6 +123,13 @@ session_program_transport_close (session_t * s)
session_manager_worker_t *wrk;
session_event_t *evt;
+ if (!session_has_transport (s))
+ {
+ /* Polling may not be enabled on main thread so close now */
+ session_transport_close (s);
+ return;
+ }
+
/* If we are in the handler thread, or being called with the worker barrier
* held, just append a new event to pending disconnects vector. */
if (vlib_thread_is_main_w_barrier () || thread_index == s->thread_index)