summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-05-14 02:11:03 +0000
committerFlorin Coras <florin.coras@gmail.com>2021-05-14 14:35:34 +0000
commit4fca744234286374a24afd31507be809383fd763 (patch)
tree4be3cb275411d691bd5604ccaf9e572103ddab2f /src
parent374df7a29407b706a5fb4fe6a6f1a7b84ec4a60e (diff)
vcl: fix lookup listener assert
The following timing may happen: 1. vpp accept new connection, send ACCEPTED to vcl, but vcl has not handle it 2. vcl unbind the listener, go into DISCONNECT state 3. vcl handle the ACCEPTED event Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: If9a96a153af38763db062df133c2fdcc04ceba9b
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vcl_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 956f077b880..f68ab45171e 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -527,6 +527,12 @@ vcl_session_table_lookup_listener (vcl_worker_t * wrk, u64 handle)
return 0;
}
+ if (s->session_state == VCL_STATE_DISCONNECT)
+ {
+ VDBG (0, "listen session [0x%llx] is closing", s->vpp_handle);
+ return 0;
+ }
+
ASSERT (s->session_state == VCL_STATE_LISTEN
|| s->session_state == VCL_STATE_LISTEN_NO_MQ
|| vcl_session_is_connectable_listener (wrk, s));