You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform
Linux 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Description
Using a crate tokio-modbus which uses TcpStream to connect to a client. If this client isn't available (like the device is offline) I get the error: Os { code: 113, kind: HostUnreachable, message: "No route to host" }
Looking up this "kind" is points me to rust-lang/rust#86442 https://github.com/rust-lang/rust/blob/a9c8887c7d548abc6c3e87f7d6fa02a0e95880bd/library/std/src/io/error.rs#L229-L230
This error is in the unstable branch. Why does TcpStream::connect() use this when I don't use the nightly? tokio = { version = "1", features = ["full"] }
I couldn't actually find where this ErrorKind variant is throw aside from
Tokio will often rely on the standard library for various kinds of logic, and when we do so, we are subject to the choices that the standard library makes. There isn't anything we can do about it.
Version
1.38
Platform
Linux 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Description
Using a crate
tokio-modbus
which uses TcpStream to connect to a client. If this client isn't available (like the device is offline) I get the error:Os { code: 113, kind: HostUnreachable, message: "No route to host" }
Looking up this "kind" is points me to rust-lang/rust#86442
https://github.com/rust-lang/rust/blob/a9c8887c7d548abc6c3e87f7d6fa02a0e95880bd/library/std/src/io/error.rs#L229-L230
This error is in the unstable branch. Why does
TcpStream::connect()
use this when I don't use the nightly?tokio = { version = "1", features = ["full"] }
I couldn't actually find where this ErrorKind variant is throw aside from
tokio/tokio/src/net/tcp/socket.rs
Lines 638 to 641 in 9a75d6f
I expected to see this happen:
See one of the stable io::Error::ErrorKinds:
or the like
The one that's being returned is appropriate but I cannot use it if i want to continue to use stable.
Instead, this happened:
Os { code: 113, kind: HostUnreachable, message: "No route to host" }
The text was updated successfully, but these errors were encountered: