Unverified Commit 966d1aa8 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[Dist] avoid busy ssh connection (#4096)

parent abcc9cce
...@@ -111,6 +111,8 @@ def execute_remote( ...@@ -111,6 +111,8 @@ def execute_remote(
thread = Thread(target=run, args=(ssh_cmd,)) thread = Thread(target=run, args=(ssh_cmd,))
thread.setDaemon(True) thread.setDaemon(True)
thread.start() thread.start()
# sleep for a while in case of ssh is rejected by peer due to busy connection
time.sleep(0.2)
return thread return thread
def get_remote_pids(ip, port, cmd_regex): def get_remote_pids(ip, port, cmd_regex):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment