diff --git a/pymilvus/orm/connections.py b/pymilvus/orm/connections.py index a90c778db..783ee823b 100644 --- a/pymilvus/orm/connections.py +++ b/pymilvus/orm/connections.py @@ -319,7 +319,8 @@ def with_config(config: Tuple) -> bool: uri = kwargs.get("uri") if uri is not None: server_type = get_server_type(uri) - if server_type == ZILLIZ and ":" not in token: + parsed_uri = parse.urlparse(uri) + if server_type == ZILLIZ and parsed_uri.port is None: kwargs["uri"] = uri + ":" + str(VIRTUAL_PORT) config = (