diff options
author | Florin Coras <fcoras@cisco.com> | 2018-12-21 13:54:09 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2018-12-22 10:34:45 -0800 |
commit | 54ddf435338ce035c1a92199acd5a3b217db177b (patch) | |
tree | c7b54567d3c86e906e24b80c1c1b634c17e9140e /src/vnet/session/session.c | |
parent | 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 (diff) |
tcp: improve waitclose in closing states
Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 4081f909482..6492ce7089e 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -830,6 +830,24 @@ stream_session_delete_notify (transport_connection_t * tc) } /** + * Notification from transport that session can be closed + * + * Should be called by transport only if it was closed with non-empty + * tx fifo and once it decides to begin the closing procedure prior to + * issuing a delete notify. This gives the chance to the session layer + * to cleanup any outstanding events. + */ +void +session_stream_close_notify (transport_connection_t * tc) +{ + stream_session_t *s; + + if (!(s = session_get_if_valid (tc->s_index, tc->thread_index))) + return; + s->session_state = SESSION_STATE_CLOSED; +} + +/** * Notify application that connection has been reset. */ void |