diff --git a/src/common/proxy_wasm/ngx_proxy_wasm.c b/src/common/proxy_wasm/ngx_proxy_wasm.c index 124f17de9..16444cd54 100644 --- a/src/common/proxy_wasm/ngx_proxy_wasm.c +++ b/src/common/proxy_wasm/ngx_proxy_wasm.c @@ -635,7 +635,8 @@ ngx_proxy_wasm_run_step(ngx_proxy_wasm_exec_t *pwexec, default: ngx_proxy_wasm_log_error(NGX_LOG_WASM_NYI, pwexec->log, 0, "NYI - proxy_wasm step: %d", step); - return NGX_ERROR; + rc = NGX_ERROR; + break; } switch (rc) { @@ -649,10 +650,14 @@ ngx_proxy_wasm_run_step(ngx_proxy_wasm_exec_t *pwexec, case NGX_OK: pwexec->ecode = NGX_PROXY_WASM_ERR_NONE; break; + default: + break; } done: + ictx->pwexec = NULL; + return pwexec->ecode; }