CONFD: Subsystem stopped. Data provider cannot detect stopped daemon nor socket close

When the data provider’s callback doesn’t respond to a request within queryTimeout, CONFD prints that there is an application timeout and stops the data provider’s daemon as expected. As the data provider is listening on the socket in a loop and is stuck, the data provider is not able to detect the socket close( I am hoping the CONFD closes this when it stops the daemon) nor the daemon’s status. Hence the data provider cannot re-register to CONFD.

How can the data provider detect that the daemon has stopped ? or when the socket closes ?

You do not state what API you are using - I am assuming it is the C DP-API, the answer may differ a little bit for others.

In a single-threaded application, it cannot - if the only thread is stuck, it cannot detect anything. If you have multiple threads, it is a common practice to have one thread handling the control socket and one (or more) handling worker socket(s); in that case the control socket thread would be able to see that the control socket has been closed and do whatever is needed.

By the way, “CONFD … stops the data provider’s daemon” is not how I would put it. CONFD has no direct control over the daemon, it merely deems the provider dead and closes the sockets, it’s up to the application to do the rest.

Yes, I am using DP-APIs only. Thank you so much! I was wondering if it would work only if its multi-threaded too. :slight_smile: Helps a lot.