diff --git a/src/wrpc/helpers.py b/src/wrpc/helpers.py index 4c20f39..36b41b7 100644 --- a/src/wrpc/helpers.py +++ b/src/wrpc/helpers.py @@ -13,7 +13,7 @@ from .rpc import Rpc class RpcEndpoint: def __init__(self, rpc, endpoints, get_endpoints, target): self.__rpc = rpc - self.__endpoints = endpoints + self.__endpoints = list(endpoints) self.__get_endpoints = get_endpoints self.__target = target @@ -24,7 +24,7 @@ class RpcEndpoint: return functools.partial(getattr(self.__rpc, name), target=random.choice(self.__endpoints)) def set_endpoints(self, endpoints): - self.__endpoints = endpoints + self.__endpoints = list(endpoints) class AsyncHelper: