session_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)
* @return 0 on success or negative number if failed to send notification.
*/
static inline int
-session_enqueue_notify (session_t * s)
+session_enqueue_notify_inline (session_t * s)
{
app_worker_t *app_wrk;
return 0;
}
+int
+session_enqueue_notify (session_t * s)
+{
+ return session_enqueue_notify_inline (s);
+}
+
int
session_dequeue_notify (session_t * s)
{
errors++;
continue;
}
- if (PREDICT_FALSE (session_enqueue_notify (s)))
+
+ if (svm_fifo_is_empty (s->rx_fifo))
+ continue;
+
+ if (PREDICT_FALSE (session_enqueue_notify_inline (s)))
errors++;
}