diff --git a/src/http/proxy_wasm/ngx_http_proxy_wasm_dispatch.c b/src/http/proxy_wasm/ngx_http_proxy_wasm_dispatch.c index 41d967a87..38391e9b1 100644 --- a/src/http/proxy_wasm/ngx_http_proxy_wasm_dispatch.c +++ b/src/http/proxy_wasm/ngx_http_proxy_wasm_dispatch.c @@ -425,6 +425,8 @@ ngx_http_proxy_wasm_dispatch_destroy(ngx_http_proxy_wasm_dispatch_t *call) sock = &call->sock; rctx = call->rctx; + dd("enter"); + ngx_wasm_socket_tcp_destroy(sock); if (call->host.data) { @@ -842,10 +844,7 @@ ngx_http_proxy_wasm_dispatch_resume_handler(ngx_wasm_socket_tcp_t *sock) /* resume current step if unfinished */ rc = ngx_proxy_wasm_resume(pwexec->parent, pwexec->parent->phase, step); - if (rc == NGX_AGAIN) { - goto done; - - } else if (rc != NGX_OK) { + if (rc != NGX_OK && rc != NGX_AGAIN) { goto error; } diff --git a/valgrind.suppress b/valgrind.suppress index c3b011f51..569fe1ec0 100644 --- a/valgrind.suppress +++ b/valgrind.suppress @@ -25,6 +25,7 @@ Memcheck:Cond fun:ngx_http_set_header_helper + ... fun:ngx_http_headers_more_exec_cmd fun:ngx_http_headers_more_filter ...