Server-Side End of Session Exits

I run a strategy that exists on session close. My concern is that if I lose connection, positions will be held after the close of the session. Is there a way to configure a broker-side close of all positions at the end of session?