Skip to content

Commit 0eded23

Browse files
committed
fixup: forgot to commit change of http::Client to use AsyncPollable to #37
1 parent 922dfcf commit 0eded23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/http/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use super::{response::IncomingBody, Body, Error, Request, Response, Result};
2-
use crate::io::{self, AsyncOutputStream};
3-
use crate::runtime::Reactor;
2+
use crate::io::{self, AsyncOutputStream, AsyncPollable};
43
use crate::time::Duration;
54
use wasi::http::types::{OutgoingBody, RequestOptions as WasiRequestOptions};
65

@@ -34,7 +33,8 @@ impl Client {
3433
OutgoingBody::finish(wasi_body, trailers).unwrap();
3534

3635
// 4. Receive the response
37-
Reactor::current().wait_for(res.subscribe()).await;
36+
AsyncPollable::new(res.subscribe()).wait_for().await;
37+
3838
// NOTE: the first `unwrap` is to ensure readiness, the second `unwrap`
3939
// is to trap if we try and get the response more than once. The final
4040
// `?` is to raise the actual error if there is one.

0 commit comments

Comments
 (0)