nanoMODBUS icon indicating copy to clipboard operation
nanoMODBUS copied to clipboard

Flush TCP socket on exception

Open stefanb2 opened this issue 5 months ago • 1 comments

Not all bytes may have been read from the TCP socket read buffer when the request processing is aborted by an exception.

  • remember the frame length from the message header
  • derease remaining length on every successful read
  • after sending the exception flush any remaining bytes from the socket

Fixes #67

stefanb2 avatar Sep 24 '24 12:09 stefanb2