events: simplify handling qubesd reconnect
Retry connection on any OSError, instead of only few selected error types. For example PermissionError may happen too (when socket is created, but before it gets appropriate mode), which wasn't listed.
This commit is contained in:
parent
1145f70334
commit
88ab55b940
@ -124,9 +124,7 @@ class EventsDispatcher(object):
|
||||
while True:
|
||||
try:
|
||||
yield from self._listen_for_events(vm)
|
||||
except (ConnectionRefusedError, ConnectionResetError,
|
||||
FileNotFoundError,
|
||||
qubesadmin.exc.QubesDaemonCommunicationError):
|
||||
except (OSError, qubesadmin.exc.QubesDaemonCommunicationError):
|
||||
pass
|
||||
if not reconnect:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user