summaryrefslogtreecommitdiff
path: root/runtime/ops
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-10-18 15:57:12 -0700
committerGitHub <noreply@github.com>2024-10-18 15:57:12 -0700
commit2c3900370ac3e0b62f1e0dfb86a883c75952146d (patch)
treedd487491bbb1bbfde8546ad8c533acad64330b4e /runtime/ops
parent8ca8174c81a3de35bcb02fc371c90f9d0a7303ab (diff)
refactor(ext/http): use concrete error types (#26377)
Diffstat (limited to 'runtime/ops')
-rw-r--r--runtime/ops/http.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs
index cec8b0ef8..cbabbe22c 100644
--- a/runtime/ops/http.rs
+++ b/runtime/ops/http.rs
@@ -34,7 +34,7 @@ fn op_http_start(
let (read_half, write_half) = resource.into_inner();
let tcp_stream = read_half.reunite(write_half)?;
let addr = tcp_stream.local_addr()?;
- return http_create_conn_resource(state, tcp_stream, addr, "http");
+ return Ok(http_create_conn_resource(state, tcp_stream, addr, "http"));
}
if let Ok(resource_rc) = state
@@ -49,7 +49,7 @@ fn op_http_start(
let (read_half, write_half) = resource.into_inner();
let tls_stream = read_half.unsplit(write_half);
let addr = tls_stream.local_addr()?;
- return http_create_conn_resource(state, tls_stream, addr, "https");
+ return Ok(http_create_conn_resource(state, tls_stream, addr, "https"));
}
#[cfg(unix)]
@@ -65,7 +65,12 @@ fn op_http_start(
let (read_half, write_half) = resource.into_inner();
let unix_stream = read_half.reunite(write_half)?;
let addr = unix_stream.local_addr()?;
- return http_create_conn_resource(state, unix_stream, addr, "http+unix");
+ return Ok(http_create_conn_resource(
+ state,
+ unix_stream,
+ addr,
+ "http+unix",
+ ));
}
Err(bad_resource_id())