aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-06-24 20:39:02 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-06-24 14:37:17 +0000
commitcde1769a839db5a732e000fb60822362b6c39e86 (patch)
treee99a8cc65c8315612d2230be2a5d5748c13817e9 /src
parent5a9d2a1758c69b0960e61b9052eb058679955990 (diff)
vcl: fix vcl_session_write_ready when connecting
Applications like curl will poll the fd after a non-blocking connect, so we need to avoid returning the wrong event. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I7ea146fc954fda631b3d88b46bb80adfbcdf137c
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vcl_private.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index 95a45ffd099..3ed376e9534 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -317,6 +317,10 @@ vcl_session_write_ready (vcl_session_t * s)
else
return VPPCOM_EBADFD;
}
+ else if (s->session_state == VCL_STATE_UPDATED)
+ {
+ return 0;
+ }
else
{
return (s->session_state == VCL_STATE_DISCONNECT) ?