diff --git a/proxy_internal.c b/proxy_internal.c index ce2666641..71fe0a32e 100644 --- a/proxy_internal.c +++ b/proxy_internal.c @@ -1729,11 +1729,6 @@ static inline int _mcplib_internal_run(LIBEVENT_THREAD *t, mcp_request_t *rq, mc // Always return OK from here as this is signalling an internal error. r->status = MCMC_OK; - // resp object is associated with the - // response object, which is about a - // kilobyte. - t->proxy_vm_extra_kb++; - return 0; } @@ -1779,6 +1774,11 @@ int mcplib_internal_run(mcp_rcontext_t *rctx) { _mcplib_internal_run(t, rq, r, resp); + // resp object is associated with the + // response object, which is about a + // kilobyte. + t->proxy_vm_extra_kb++; + if (resp->io_pending) { // TODO (v2): here we move the IO from the temporary resp to the top // resp, but this feels kludgy so I'm leaving an explicit note to find