proxy_handler: Fix return value of proxy_handler_2()

This commit is contained in:
2026-06-01 12:44:32 +02:00
parent 42b5b94004
commit bb651789ba
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -410,7 +410,7 @@ int proxy_init(proxy_ctx_t **proxy_ptr, http_req *req, http_res *res, http_statu
if (!retry)
return -1;
// honor server timeout with one second buffer
// honor server timeout with one-second buffer
if (!proxy->initialized || srv_error ||
(proxy->http_timeout > 0 && (clock_micros() - proxy->proxy.ts_last_send) >= proxy->http_timeout) ||
sock_has_pending(&proxy->proxy, SOCK_DONTWAIT))
+1 -1
View File
@@ -155,5 +155,5 @@ static int proxy_handler_2(client_ctx_t *ctx) {
ctx->transferred_length += ret;
}
return ret;
return ret >= 0 ? 0 : ret;
}