session: half-open free only on main thread
[vpp.git] / src / vnet / session / session.c
index 56a1fd7..a60735d 100644 (file)
@@ -347,16 +347,15 @@ void
 session_half_open_delete_notify (transport_connection_t *tc)
 {
   /* Notification from ctrl thread accepted without rpc */
-  if (tc->thread_index <= 1)
+  if (!tc->thread_index)
     {
       session_half_open_free (ho_session_get (tc->s_index));
     }
   else
     {
       void *args = uword_to_pointer ((uword) tc->s_index, void *);
-      u32 ctrl_thread = vlib_num_workers () ? 1 : 0;
-      session_send_rpc_evt_to_thread (ctrl_thread, session_half_open_free_rpc,
-                                     args);
+      session_send_rpc_evt_to_thread_force (0, session_half_open_free_rpc,
+                                           args);
     }
 }