summaryrefslogtreecommitdiff
path: root/ext/http/http_next.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-04-24 14:03:37 -0400
committerGitHub <noreply@github.com>2024-04-24 14:03:37 -0400
commiteed2598e6cf1db643b4edd07b5eff94c59eb9408 (patch)
tree0320981bba82c78647b9cf335793381400093ad9 /ext/http/http_next.rs
parentb60822f6e0e3c1f3e360657cfb67c114df2e7032 (diff)
feat(ext/http): Implement request.signal for Deno.serve (#23425)
When the response has been successfully send, we abort the `Request.signal` property to indicate that all resources associated with this transaction may be torn down.
Diffstat (limited to 'ext/http/http_next.rs')
-rw-r--r--ext/http/http_next.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs
index a6527397f..9bdb79f86 100644
--- a/ext/http/http_next.rs
+++ b/ext/http/http_next.rs
@@ -683,7 +683,7 @@ pub async fn op_http_set_response_body_resource(
#[smi] stream_rid: ResourceId,
auto_close: bool,
status: u16,
-) -> Result<(), AnyError> {
+) -> Result<bool, AnyError> {
let http =
// SAFETY: op is called with external.
unsafe { clone_external!(external, "op_http_set_response_body_resource") };
@@ -716,8 +716,7 @@ pub async fn op_http_set_response_body_resource(
},
);
- http.response_body_finished().await;
- Ok(())
+ Ok(http.response_body_finished().await)
}
#[op2(fast)]