Преглед на файлове

events: try reconnecting to qubesd also on BrokenPipeError

When qubesd exits while writing to it, not reading, the error is
BrokenPipe, not EOF. Handle it the same.
Marek Marczykowski-Górecki преди 5 години
родител
ревизия
e7bc8f21d5
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      qubesadmin/events/__init__.py

+ 2 - 0
qubesadmin/events/__init__.py

@@ -173,6 +173,8 @@ class EventsDispatcher(object):
                         value = (yield from reader.readuntil(b'\0'))[:-1].\
                             decode('utf-8')
                         kwargs[key] = value
+                except BrokenPipeError:
+                    break
                 except asyncio.IncompleteReadError as err:
                     if err.partial == b'':
                         break