diff options
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 7 |
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) |