restarting connection if there is no valid session