fix: ensure we catch non errors for libvirt

This commit is contained in:
Alexis
2021-08-31 05:18:29 +09:30
parent d265cdee31
commit e360acf2d1
+1 -1
View File
@@ -151,7 +151,7 @@ const watchLibvirt = async (useCache = true) => {
return watchLibvirt();
} catch (error: unknown) {
// We need to try and reconnect
if ((error as Error).message.includes('invalid connection pointer')) {
if (`${error}`.includes('invalid connection pointer')) {
log.warn('Reconnecting to libvirt socket...');
await sleep(5_000);
return watchLibvirt(false);