diff options
author | fanyf <fanyufei521@outlook.com> | 2020-10-13 17:07:16 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-10-14 05:54:08 +0000 |
commit | a49d59dfe9198c05516dae0ff0e4d4d3b63755dc (patch) | |
tree | eda9b134f97dca31f443d83530463415ea5692ca /src | |
parent | b438c763a10649a88ba2bed8795abf97af2a0b0d (diff) |
vcl: set STATE_UPDATED state when connect with non-blocking socket!
State set to STATE_UPDATED to ensure the session is not assumed to be open and to also allow the app to close it prior to vpp's connected reply!
Type: fix
Signed-off-by: fanyf <fanyufei521@outlook.com>
Change-Id: I7a6d0914599cb9296d112205dac725ecd11a5d0f
Diffstat (limited to 'src')
-rw-r--r-- | src/vcl/vppcom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index f1bb2b0def5..6b9e36c2d7d 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1723,7 +1723,10 @@ vppcom_session_connect (uint32_t session_handle, vppcom_endpt_t * server_ep) if (VCL_SESS_ATTR_TEST (session->attr, VCL_SESS_ATTR_NONBLOCK)) { - session->session_state = STATE_CONNECT; + /* State set to STATE_UPDATED to ensure the session is not assumed + * to be open and to also allow the app to close it prior to vpp's + * connected reply. */ + session->session_state = STATE_UPDATED; return VPPCOM_EINPROGRESS; } |