From: Daan De Meyer Date: Wed, 6 Sep 2023 09:58:57 +0000 (+0200) Subject: Ignore ConnectionResetError in vsock notify handler X-Git-Tag: v16~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09d62447f544d5faaf96474b7964a7173864584a;p=thirdparty%2Fmkosi.git Ignore ConnectionResetError in vsock notify handler Let's handle this one gracefully but still debug log about it when it happens. --- diff --git a/mkosi/qemu.py b/mkosi/qemu.py index b6defb77e..857933061 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -180,8 +180,11 @@ def vsock_notify_handler() -> Iterator[tuple[str, dict[str, str]]]: with s: data = [] - while (buf := await loop.sock_recv(s, 4096)): - data.append(buf) + try: + while (buf := await loop.sock_recv(s, 4096)): + data.append(buf) + except ConnectionResetError: + logging.debug("vsock notify listener connection reset by peer") for msg in b"".join(data).decode().split("\n"): if not msg: