Skip to content

Commit

Permalink
vcl: fix vcl_session_write_ready when connecting
Browse files Browse the repository at this point in the history
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
  • Loading branch information
liuyacan authored and florincoras committed Jun 24, 2021
1 parent 5a9d2a1 commit cde1769
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vcl/vcl_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ?
Expand Down

0 comments on commit cde1769

Please sign in to comment.