Pārlūkot izejas kodu

events: improve handling qubesd restart

qubesd may be restarted during different stages of connection - either
while attempting to connect, or while already listening on events.
Adjust exception list accordingly.

This is especially important for qvm-start-gui - otherwise it crashes on
qubesd restart.
Marek Marczykowski-Górecki 7 gadi atpakaļ
vecāks
revīzija
ba2057a2c6
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      qubesadmin/events/__init__.py

+ 2 - 1
qubesadmin/events/__init__.py

@@ -118,7 +118,8 @@ class EventsDispatcher(object):
         while True:
             try:
                 yield from self._listen_for_events(vm)
-            except ConnectionRefusedError:
+            except (ConnectionRefusedError, ConnectionResetError,
+                    FileNotFoundError):
                 pass
             if not reconnect:
                 break