diff options
author | Vladimir Homutov <vl@nginx.com> | 2021-09-23 16:25:49 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2021-09-23 16:25:49 +0300 |
commit | f5d0c6db674b9c40f995559051e8847157229b57 (patch) | |
tree | 8e9e64fc894b90a83c31ed5c9125a940ee04a486 /src/stream/ngx_stream_proxy_module.c | |
parent | bbd05ae252bce1907173d13c6e48d1bed71cd9ea (diff) | |
download | nginx-f5d0c6db674b9c40f995559051e8847157229b57.tar.gz nginx-f5d0c6db674b9c40f995559051e8847157229b57.zip |
QUIC: added shutdown support in stream proxy.
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r-- | src/stream/ngx_stream_proxy_module.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c index 934e7d8f2..8a7f3b665 100644 --- a/src/stream/ngx_stream_proxy_module.c +++ b/src/stream/ngx_stream_proxy_module.c @@ -1767,6 +1767,21 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream, if (dst->type == SOCK_STREAM && pscf->half_close && src->read->eof && !u->half_closed && !dst->buffered) { + +#if (NGX_STREAM_QUIC) + if (dst->quic) { + + if (ngx_quic_shutdown_stream(dst, NGX_WRITE_SHUTDOWN) + != NGX_OK) + { + ngx_stream_proxy_finalize(s, + NGX_STREAM_INTERNAL_SERVER_ERROR); + return; + } + + } else +#endif + if (ngx_shutdown_socket(dst->fd, NGX_WRITE_SHUTDOWN) == -1) { ngx_connection_error(c, ngx_socket_errno, ngx_shutdown_socket_n " failed"); |