aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-07-22 12:59:30 -0700
committerDave Barach <openvpp@barachs.net>2018-07-23 20:23:58 +0000
commit8409955e4b27f9797d9e7bb1ef7064d04ff03f71 (patch)
tree7a921c69e0ac9e7aab42723e009173946c3b074c /src/vnet/session/application.c
parent6b9b41c832332e9e9876edad51917230e4e9a4af (diff)
session: send rx events only if session ready
Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 1dc04f0afa7..5f18bd27b2a 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -841,10 +841,11 @@ app_send_io_evt_rx (application_t * app, stream_session_t * s, u8 lock)
svm_msg_q_msg_t msg;
svm_msg_q_t *mq;
- if (PREDICT_FALSE (s->session_state == SESSION_STATE_CLOSED))
+ if (PREDICT_FALSE (s->session_state != SESSION_STATE_READY))
{
/* Session is closed so app will never clean up. Flush rx fifo */
- svm_fifo_dequeue_drop_all (s->server_rx_fifo);
+ if (s->session_state == SESSION_STATE_CLOSED)
+ svm_fifo_dequeue_drop_all (s->server_rx_fifo);
return 0;
}