File fixing-streamclosed-issue.patch of Package salt

From 82d1cadff4fa6248a9d891a3c228fc415207d8d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mihai=20Dinc=C4=83?= <dincamihai@users.noreply.github.com>
Date: Tue, 26 Nov 2019 18:26:31 +0100
Subject: [PATCH] Fixing StreamClosed issue

---
 salt/cli/batch_async.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py
index f3d92b88f1..8d2601e636 100644
--- a/salt/cli/batch_async.py
+++ b/salt/cli/batch_async.py
@@ -232,7 +232,6 @@ class BatchAsync:
                 "metadata": self.metadata,
             }
             self.event.fire_event(data, "salt/batch/{}/done".format(self.batch_jid))
-            self.event.remove_event_handler(self.__event_handler)
             for (pattern, label) in self.patterns:
                 if label in ["ping_return", "batch_run"]:
                     self.event.unsubscribe(pattern, match_type="glob")
@@ -277,6 +276,7 @@ class BatchAsync:
 
     def __del__(self):
         self.local = None
+        self.event.remove_event_handler(self.__event_handler)
         self.event = None
         self.ioloop = None
         gc.collect()
-- 
2.29.2
openSUSE Build Service is sponsored by