Skip to content

Commit c3205a0

Browse files
committed
explain reason for ignoring fut param in InstanceState::send_request
Signed-off-by: Joel Dice <[email protected]>
1 parent cff6451 commit c3205a0

File tree

1 file changed

+8
-1
lines changed
  • crates/factor-outbound-http/src

1 file changed

+8
-1
lines changed

crates/factor-outbound-http/src/wasi.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,14 @@ impl p3::WasiHttpCtx for InstanceState {
7373
>,
7474
> + Send,
7575
> {
76-
// TODO: do we neeed to do anything with `fut`?
76+
// If the caller (i.e. the guest) has trouble consuming the response
77+
// (e.g. encountering a network error while forwarding it on to some
78+
// other place), it can report that error to us via `fut`. However,
79+
// there's nothing we'll be able to do with it here, so we ignore it.
80+
// Presumably the guest will also drop the body stream and trailers
81+
// future if it encounters such an error while those things are still
82+
// arriving, which Hyper will deal with as appropriate (e.g. closing the
83+
// connection).
7784
_ = fut;
7885

7986
let request_sender = RequestSender {

0 commit comments

Comments
 (0)