Prevent recursive loop when reconnecting