Closed seritools closed 3 months ago
Here is an explanation of the Disconnect
variant
https://github.com/slowtec/tokio-modbus/blob/13fcb838b09b0b11d8a26b7099c330ef7e1cb480/src/frame/mod.rs#L178-L187
that causes the panic here:
So the question is why is https://github.com/slowtec/tokio-modbus/blob/13fcb838b09b0b11d8a26b7099c330ef7e1cb480/src/frame/mod.rs#L222
called when it must not 🤔
Here we are: https://github.com/slowtec/tokio-modbus/blob/13fcb838b09b0b11d8a26b7099c330ef7e1cb480/src/service/rtu.rs#L51-L52
@uklotzde I think that disconnect
needs to be checked before calling function_code()
right?
Hi there, just updated from 0.11 to 0.13 in my toy project.
Now receiving this panic on
Context::disconnect()
at cleanup time:I'm using rtu and am on Windows. I can reproduce it with this minimal code:
Please let me know if you need more information! Thanks!