pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.25k stars 919 forks source link

on_reconnect_callback removed, on_connect_callback added. #2122

Closed janiversen closed 6 months ago

janiversen commented 6 months ago

on_reconnect_callback connected the app directly with the transport layer and caused problems. It was not implemented in the sync client.

Added new parameter: on_connect_callback() For async clients on_connect_callback(True) is called when client is connected, and on_connect_callback(False) is called when client is disconnected.

Remark, the disconnected call, does NOT replace the reconnect mechanism, but is merely meant as an informative call.