Thanks for the review Robert - the problem with trying to do both checks in parallel is it makes the management of the callback data more complicated since both will want to share the same structure but each needs to know which systemd unit it is checking, but I will see what I can do. Also I was hesitant to refactor the existing code too much to keep this easier to review but I agree it will probably make the whole thing a bit nicer so will also have a look at that. Thanks.
Thanks for the review Robert - the problem with trying to do both checks in parallel is it makes the management of the callback data more complicated since both will want to share the same structure but each needs to know which systemd unit it is checking, but I will see what I can do. Also I was hesitant to refactor the existing code too much to keep this easier to review but I agree it will probably make the whole thing a bit nicer so will also have a look at that. Thanks.