Description
When running the example code, I am getting this when the slave device does not respond in time (on the order of half a second)
thread 'main' panicked at src\main.rs:12:45:
called `Result::unwrap()` on an `Err` value: Transport(Os { code: 0, kind: Uncategorized, message: "The operation completed successfully." })
I narrowed down the source of the error object to line below.
tokio-modbus/src/service/tcp.rs
Line 104 in 56bf0fa
It should be said that I only had it happen on Windows, but on my main Linux machine not only did I not get that unhelpful message, but the error wouldn't happen at all. Not too surprising considering the message comes from a syscall. I'm less concerned about the fact that an error happened than I am about the unhelpful message. If you want me to try something to test a fix I will gladly do it, but I would suggest not relying on the 'get last error' syscall to trace the error. Or maybe wrap it with some extra context like "Failed to read response frame with OS error: {}"