diff options
author | Florin Coras <fcoras@cisco.com> | 2017-08-29 14:50:13 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-08-30 13:15:32 +0000 |
commit | 50958959b57c9c2d3fc72ae7588c53d1804aeb86 (patch) | |
tree | d4774799c08e0a1765443b82b792f22ac076a247 /src/vnet/session/session.c | |
parent | e3434397f2533b52aeccb594eb9610e99b556f43 (diff) |
tcp: re-enable persist timer if no data available to send
Additionally, flush rx fifos for closed sessions.
Change-Id: If2cc563fbda0451e7572650e98b15f0a694a0ff9
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index ee22ccbe0ad..dcd141f1b5b 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -330,7 +330,13 @@ stream_session_enqueue_notify (stream_session_t * s, u8 block) static u32 serial_number; if (PREDICT_FALSE (s->session_state == SESSION_STATE_CLOSED)) - return 0; + { + /* Session is closed so app will never clean up. Flush rx fifo */ + u32 to_dequeue = svm_fifo_max_dequeue (s->server_rx_fifo); + if (to_dequeue) + svm_fifo_dequeue_drop (s->server_rx_fifo, to_dequeue); + return 0; + } /* Get session's server */ app = application_get_if_valid (s->app_index); |