Cdb_trigger_subscriptions() returns CONFD_OK in failure case

cdb_trigger_subscriptions() is a blocking call & it does return with CONF_OK once all subscribers have acknowledged the notification.

In my case, while cdb_trigger_subscriptions() is in progress because of some reason confd closes the socket and my system does confd resync.

So once confd socket closed, cdb_trigger_subscriptions() gets unblocked with return value as CONFD_OK. Here I am expecting cdb_trigger_subscriptions() should get unblocked with CONFD_ERR as it got unblocked in-between i.e. without completion of subscribers notification.

Is there any way to detect this failure?
I tried to use confd_trans_seterr_extended() but it need transaction context which is not available for cdb_trigger_sunscriptions().

CDB subscribers are never declared like callbacks that implement action callbacks or data provider callbacks, so ConfD is happy to keep running with or without them. Things are a bit different with “mandatory subscribers”, but that does not apply to cdb_trigger_subscriptions either.

So, I’m afraid you are on your own here. cdb_trigger_subscriptions is typically called from a watchdog application that takes care of (re)starting applications. If that is your case, you already have a solution at hand; if it is not, I think you have to implement something like that - the application that calls cdb_trigger_subscriptions also needs to watch for subscriber termination, or be somehow notified by the actual watchdog that a subscriber terminated.