Check PROTOCOL_FAILURE as well in the connect_to_server_*