comparison src/stream/ngx_stream_proxy_module.c @ 8890:b4c7853b0488 quic

QUIC: added shutdown support in stream proxy.
author Vladimir Homutov <vl@nginx.com>
date Thu, 23 Sep 2021 16:25:49 +0300
parents bfad703459b4
children 8d0753760546
comparison
equal deleted inserted replaced
8889:61d0fa67b55e 8890:b4c7853b0488
1765 if (dst) { 1765 if (dst) {
1766 1766
1767 if (dst->type == SOCK_STREAM && pscf->half_close 1767 if (dst->type == SOCK_STREAM && pscf->half_close
1768 && src->read->eof && !u->half_closed && !dst->buffered) 1768 && src->read->eof && !u->half_closed && !dst->buffered)
1769 { 1769 {
1770
1771 #if (NGX_STREAM_QUIC)
1772 if (dst->quic) {
1773
1774 if (ngx_quic_shutdown_stream(dst, NGX_WRITE_SHUTDOWN)
1775 != NGX_OK)
1776 {
1777 ngx_stream_proxy_finalize(s,
1778 NGX_STREAM_INTERNAL_SERVER_ERROR);
1779 return;
1780 }
1781
1782 } else
1783 #endif
1784
1770 if (ngx_shutdown_socket(dst->fd, NGX_WRITE_SHUTDOWN) == -1) { 1785 if (ngx_shutdown_socket(dst->fd, NGX_WRITE_SHUTDOWN) == -1) {
1771 ngx_connection_error(c, ngx_socket_errno, 1786 ngx_connection_error(c, ngx_socket_errno,
1772 ngx_shutdown_socket_n " failed"); 1787 ngx_shutdown_socket_n " failed");
1773 1788
1774 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR); 1789 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);