with TCP, automatic reconnect on error may not be desired.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmodbus |
Fix Released
|
Medium
|
Stéphane Raimbault |
Bug Description
per discussion at:
https:/
TCP connect can hang (for 3 to 190 seconds in practice) if the TCP connected rtu is not responding, which is a bad thing in a near/soft real time system.
doing an automatic reconnect on error means the application will hang until connect returns, instead of allowing the application to chose when it wants to risk the hang.
That is, the application might instead want to ping (with timeout) the host occasionally and only try to reconnect when the app knows the remote host is up.
I am not stuck on the names of variables or the type I added in this patch, feel free to change them to match better with the project.
A note, which I did not add in the patch...
the application should close and reconnect before attempting to use the TCPrtu again when there are errors that call error_treat[1], because with my setup I did see anomalies when using the same connection after a fault that would have caused a reconnect.
[1] any of the faults under /* Local */
Related branches
Changed in libmodbus: | |
status: | Fix Committed → Fix Released |
when iam trying to connect the deive through TCO it shows me
connecting to 192.168.0.100 and it takes like 3 minutes
and after 3 minutes it display
connect:connection timed out
what does it mean?
does it connected to my device fro a long time
or it did not connected to my device
can you suggest me anything?