modbus icon indicating copy to clipboard operation
modbus copied to clipboard

Added a receive flush timeout just prior to launching the next poll when

Open wz2b opened this issue 4 years ago • 1 comments

using a TCP connection. Without this, a slow response can cause transaction ID mismatches for the life of this TCP connection (it never recovers). This occurs when a remote device does answer, but it answers too slowly. The request has already timed out, and when the next request is launched the previous response is read (rather than the new one) causing this error.

wz2b avatar Aug 26 '20 21:08 wz2b

hi,i think you should change the SetReadDeadline(time.now) to SetReadDeadline(time.now().add(time.millisecod*1))

HarryChen001 avatar Jul 01 '21 12:07 HarryChen001