Skip to content
Permalink
Browse files

Catch socket.error from h2_daemon_get:request()

So "om mon" on a remote down node reports "[Errno 113] No route to host"
and on the local node reports "[Errno 111] Connection refused" ... instead
of stacking.
  • Loading branch information...
cvaroqui committed Jun 28, 2019
1 parent b18f72a commit 4a5262681d48a4d69eee6724eaa86f6a567f4c2d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/comm.py
@@ -713,7 +713,7 @@ def h2_daemon_get(self, data, server=None, node=None, with_result=True, silent=F
raise ex.excError(str(exc))
except ConnectionResetError:
return {"status": 1, "error": "%s %s connection reset"%(method, path)}
except (ConnectionRefusedError, ssl.SSLError) as exc:
except (ConnectionRefusedError, ssl.SSLError, socket.error) as exc:
return {"status": 1, "error": "%s"%exc}
resp = conn.get_response()
data = resp.read()

0 comments on commit 4a52626

Please sign in to comment.
You can’t perform that action at this time.