Release connections on re-connect and shutdown