After successfully calling ListenStop when i terminate the server application.
Here is the callstack when i terminate the server application:
:7441ddc2 KERNELBASE.RaiseException + 0x62
IB_Session.TIB_SessionBase.isc_rollback_transaction($BB5,$19FB11)
System._Assert('Assertion failure','C:\Users\Superkey\Documents\SleekProductions\3rdParty\IBO\source\core\IB_Session.pas',2997)
IB_Session.TIB_SessionBase.isc_rollback_transaction($19FB50,$4D0C2FC)
IB_Components.TIB_Transaction.API_Rollback
IB_Components.TIB_Transaction.SysRollbackBegin(False)
IB_Components.TIB_Transaction.SysRollback(False)
IB_Components.CloseWithLosses
IB_Components.TIB_Transaction.Close
IB_Components.TIB_Connection.CloseTransactions
IB_Components.TIB_Connection.Destroy
System.TObject.Free
System.Classes.TComponent.DestroyComponents
System.Classes.TComponent.Destroy
System.Classes.TDataModule.Destroy
System.TObject.Free
rtcInfo.TRtcObjectLink.DestroyOwner
rtcInfo.TRtcObjectManager.FreeObjects
rtcInfo.TRtcObjectManager.Destroy
rtcLink.TRtcRemoteObjectManager.Destroy
System.TObject.Free
rtcTypes.RtcFreeAndNil((no value))
rtcInfo.TRtcInfo.Clear
rtcInfo.TRtcRecord.Destroy
rtcInfo.TRtcSession.Destroy
System.TObject.Free
rtcTypes.RtcFreeAndNil((no value))
rtcDataSrv.DoneSessions
rtcDataSrv.TRtcDataSrvUnit.Destroy
System.TObject.Free
rtcTypes.RtcFreeAndNil((no value))
rtcDataSrv.Finalization
System.FinalizeUnits
System._Halt0
This happen so late that the finalization section of the DACs session unit has been executed. So it's client library has been closed.
Maybe i'm doing something wrong with the sessions. I have not added any session-specific code yet, though.