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:
|
while True:
|
||||||
try:
|
try:
|
||||||
yield from self._listen_for_events(vm)
|
yield from self._listen_for_events(vm)
|
||||||
except (ConnectionRefusedError, ConnectionResetError,
|
except (OSError, qubesadmin.exc.QubesDaemonCommunicationError):
|
||||||
FileNotFoundError,
|
|
||||||
qubesadmin.exc.QubesDaemonCommunicationError):
|
|
||||||
pass
|
pass
|
||||||
if not reconnect:
|
if not reconnect:
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user