Skip to content

connect_timeout is used twice in wasmtime-wasi-http's outgoing handler #8104

@elliottt

Description

@elliottt

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingwasi:implIssues pertaining to WASI implementation in Wasmtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions