diff options
author | liuyacan <liuyacan@corp.netease.com> | 2021-05-09 03:50:40 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-05-12 04:45:07 +0000 |
commit | 534468e9f768ae7465ef722520dadfd916cdc9fb (patch) | |
tree | 7433d66e807340a2b5e0abbe152b6b944f32675d /src/vcl/ldp.c | |
parent | 7b2917fbe2a9ec17f69ca94fcbae534927915834 (diff) |
session: support half-close connection
Some app(e.g. Envoy) may call shutdown() instead of close() when
draining connection.
Type: improvement
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r-- | src/vcl/ldp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index 64a4e7c77db..f27f6ba8e97 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -2219,6 +2219,8 @@ shutdown (int fd, int how) if (flags == SHUT_RDWR) rv = close (fd); + else if (flags == SHUT_WR) + rv = vls_shutdown (vlsh); } else { |