[core] skip some trace if backend Upgrade (#3044)

(thx flynn)

To reduce log noise, skip warning trace reporting error on backend
socket if the connection has been upgraded, e.g. to websockets

  "Socket errors after update to version 1.4.56"
This commit is contained in:
Glenn Strauss 2020-12-09 14:40:58 -05:00
parent 1d9cab1bc3
commit de29a37771
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include "buffer.h"
#include "chunk.h"
#include "fdevent.h"
#include "http_header.h"
#include "log.h"
#include "sock_addr.h"
@ -2265,7 +2266,7 @@ static handler_t gw_recv_response_error(gw_handler_ctx * const hctx, request_st
"socket: %s for %s?%.*s, closing connection",
(long long)hctx->wb.bytes_out, proc->connection_name->ptr,
r->uri.path.ptr, BUFFER_INTLEN_PTR(&r->uri.query));
} else {
} else if (!light_btst(r->resp_htags, HTTP_HEADER_UPGRADE)) {
log_error(r->conf.errh, __FILE__, __LINE__,
"response already sent out, but backend returned error on "
"socket: %s for %s?%.*s, terminating connection",