diff options
Diffstat (limited to 'ext/http/http_next.rs')
-rw-r--r-- | ext/http/http_next.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs index 98fbd1f8b..9504a6fa4 100644 --- a/ext/http/http_next.rs +++ b/ext/http/http_next.rs @@ -716,6 +716,8 @@ pub async fn op_http_set_response_body_resource( } }; + *http.needs_close_after_finish() = true; + set_response( http.clone(), resource.size_hint().1.map(|s| s as usize), @@ -726,7 +728,6 @@ pub async fn op_http_set_response_body_resource( }, ); - *http.needs_close_after_finish() = true; http.response_body_finished().await; Ok(()) } |