-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom TCP connect timeout ? #19
Comments
@jvelo Sorry for the late reply. |
any progress / plans for this? it made me ditch the sync client and write this async abomination instead (my first time using futures, too) let mut rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
let mut ctx = tokio::time::timeout(Duration::from_secs(3),
tokio_modbus::client::tcp::connect_slave(socket_addr, Slave(12)))
.await.unwrap().unwrap();
// more stuff
}); |
This saved me. Ugly but works |
I consider the issue to be resolved. |
Hello,
Is it possible to set a custom TCP connect timeout ?
I'm new to rust, I might be missing some things obvious in the way tokio works
If it's not possible and of interest, I'm willing to give it a go.
Thanks!
The text was updated successfully, but these errors were encountered: