From 7cc3fe6a52d3e844a4e2689cf5b702d09ae9f9f0 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mon, 20 Feb 2023 11:48:24 +0100 Subject: [PATCH] try to close failing connection --- vm/kojivmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vm/kojivmd b/vm/kojivmd index f8e1b92b..4f5cb983 100755 --- a/vm/kojivmd +++ b/vm/kojivmd @@ -76,6 +76,10 @@ class LibvirtCallable(object): logging.getLogger("koji.vm").warning( 'Internal libvirt error: %s, retry #%d/%d' % (ex, retry, max_retries)) time.sleep(5) + try: + self.conn._conn.close() + except Exception: + pass self.conn._conn = libvirt.open(None) else: raise