summaryrefslogtreecommitdiff
path: root/ext/http/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/http/lib.rs')
-rw-r--r--ext/http/lib.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/http/lib.rs b/ext/http/lib.rs
index 2c858143c..db55ca53d 100644
--- a/ext/http/lib.rs
+++ b/ext/http/lib.rs
@@ -196,13 +196,12 @@ async fn op_http_request_next(
Poll::Ready(Err(e)) => {
// TODO(ry) close RequestResource associated with connection
// TODO(ry) close ResponseBodyResource associated with connection
- // close ConnResource
- state
+ // try to close ConnResource, but don't unwrap as it might
+ // already be closed
+ let _ = state
.borrow_mut()
.resource_table
- .take::<ConnResource>(conn_rid)
- .unwrap();
-
+ .take::<ConnResource>(conn_rid);
if should_ignore_error(&e) {
true
} else {