Indeed the connection state tracking is not available in present version. I began working on that as part of feature branch which should be merged soon: https://github.com/apache/plc4x/pull/241
There are few new things: 1) EventListener (connection, message) 2) EventPlcConnection With these it will be possible to receive connection shutdown on client side. With this it will be possible to detect disconnection through wrapping netty apis. This is intended to get merged into 0.9. Best, Łukasz On 12.08.2021 08:21, Andreas Vogler wrote: > Hi, > > How can I check the state of a connection? Especially if it is lost. > > I have a ModBus connection and when I turn off the ModBus server I do not get > any error. > > I have found the orTimeout option at the response object… > > But I want somehow detect if a connection is lost, so that I can do a > reconnect… > > Hope someone can give me an advice how this is typically done with Plc4x. > > Regard, > Andreas >
