From ff2e9a5e1dba85719b83800e4cc188f216fd42db Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Fri, 2 Apr 2021 16:07:32 +0800 Subject: [PATCH] fix: remove wrong commit file (#2277) * fix(helper): fix get ip --- jina/helper.py | 4 +--- test.py | 0 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 test.py diff --git a/jina/helper.py b/jina/helper.py index 1e99a3cd03078..d03351209dc9c 100644 --- a/jina/helper.py +++ b/jina/helper.py @@ -1042,7 +1042,6 @@ def get_internal_ip(): return ip -@functools.lru_cache(maxsize=1) def get_public_ip(): """ Return the public IP address of the gateway for connecting from other machine in the public network. @@ -1050,7 +1049,6 @@ def get_public_ip(): :return: Public IP address. """ import urllib.request - from threading import Thread timeout = 0.5 @@ -1072,7 +1070,7 @@ def _get_ip(url): threads = [] for idx, ip in enumerate(ip_server_list): - t = Thread(target=_get_ip, args=(ip,)) + t = threading.Thread(target=_get_ip, args=(ip,)) threads.append(t) t.start() diff --git a/test.py b/test.py deleted file mode 100644 index e69de29bb2d1d..0000000000000