stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.44k stars 1.75k forks source link

Fixed MODBUS_ERROR_RECOVERY_LINK not working on Windows. #644

Closed embeddedmz closed 2 years ago

embeddedmz commented 2 years ago

Fixes issue #643

Otherwise, I don't like how error recovery is coded : if we want to break the loop (e.g. to close the program), we need to disable the error recovery from another thread but it is not a good idea to use the context on many threads. It is best to use a finite number of attempts to ensure that the function does not loop indefinitely. Or just remove the do-while loop !

cla-bot[bot] commented 2 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

cla-bot[bot] commented 2 years ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

stephane commented 2 years ago

Added to CLA bot.

embeddedmz commented 2 years ago

@stephane is it OK now ?

stephane commented 2 years ago

Yes thank you @embeddedmz