Merge pull request #96 from uqbar-dao/da/http-client-fix

http-client-fix
This commit is contained in:
tadad 2023-12-12 19:50:08 +02:00 committed by GitHub
commit f0225458dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,6 @@ async fn handle_message(
match client.execute(request).await {
Ok(response) => {
if expects_response.is_some() {
let _ = send_to_loop
.send(KernelMessage {
id,
@ -149,12 +148,12 @@ async fn handle_message(
message: Message::Response((
Response {
inherit: false,
ipc: serde_json::to_vec::<Result<HttpResponse, HttpClientError>>(
&Ok(HttpResponse {
ipc: serde_json::to_vec::<Result<HttpResponse, HttpClientError>>(&Ok(
HttpResponse {
status: response.status().as_u16(),
headers: serialize_headers(response.headers()),
}),
)
},
))
.unwrap(),
metadata: None,
},
@ -168,7 +167,6 @@ async fn handle_message(
})
.await;
}
}
Err(e) => {
make_error_message(
our,