Fix badmatch in set_passive_or_reconnect_if_required