The existing CEspConfig::ensureSDSSessionDomains() contains 2 groups of functions: 1. read Session Domains settings; 2. ensure SDS Session in dali. The ensureSDSSessionDomains() is called in initDali() which is called when esp is started and when esp is re-attached to dali. I suggest that the 1st group of the functions should be moved to a new method which is only called when esp is starting. The 2nd group of functions should be called only once.
The existing EspHttpBinding::setSDSSession() is used to ensure that /Sessions/Process has an Application branch for the esp binding. It is called when EspHttpBinding is created. That does not work if esp is not attached to dali at the time EspHttpBinding is creating. I suggest that this function should be moved into the 2nd group of functions of the ensureSDSSessionDomains().