diff --git a/pydu/request.py b/pydu/request.py index 834ed0d..3e87cdf 100644 --- a/pydu/request.py +++ b/pydu/request.py @@ -103,6 +103,10 @@ def download(url, dst=None): def check_connect(ip, port, retry=1, timeout=0.5): + """ + Check whether given ip and port could connect or not. + It will retry and timeout on given. + """ while retry: try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)