As mentioned in #8085, the connect_timeout is used to timeout both the initial tcp connection, and the handshake result from hyper. We likely only need the first timeout on the tcp connection, but it would be good to validate this.
Concretely, we can probably remove the timeout uses from these two places in types.rs:
|
let (sender, conn) = timeout( |
|
connect_timeout, |
|
hyper::client::conn::http1::handshake(stream), |
|
) |
|
.await |
|
.map_err(|_| types::ErrorCode::ConnectionTimeout)? |
|
let (sender, conn) = timeout( |
|
connect_timeout, |
|
// TODO: we should plumb the builder through the http context, and use it here |
|
hyper::client::conn::http1::handshake(tcp_stream), |
|
) |
|
.await |
|
.map_err(|_| types::ErrorCode::ConnectionTimeout)? |
As mentioned in #8085, the
connect_timeoutis used to timeout both the initial tcp connection, and thehandshakeresult from hyper. We likely only need the first timeout on the tcp connection, but it would be good to validate this.Concretely, we can probably remove the timeout uses from these two places in
types.rs:wasmtime/crates/wasi-http/src/types.rs
Lines 207 to 212 in d27fc3d
wasmtime/crates/wasi-http/src/types.rs
Lines 228 to 234 in d27fc3d