You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/12/29 17:39:34 UTC

[incubator-ponymail-foal] branch master updated: Revert 70de0e1 - breaks the loops when running multiple instances

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 5617329  Revert 70de0e1 - breaks the loops when running multiple instances
5617329 is described below

commit 5617329dff512ec846d269726f2a2eeb396b7d43
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Dec 29 18:39:28 2021 +0100

    Revert 70de0e1 - breaks the loops when running multiple instances
---
 server/main.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/main.py b/server/main.py
index 9535e86..13a1b48 100644
--- a/server/main.py
+++ b/server/main.py
@@ -212,10 +212,12 @@ class Server(plugins.server.BaseServer):
         await plugins.background.run_tasks(self)
 
     def run(self):
+        loop = asyncio.get_event_loop()
         try:
-            asyncio.run(self.server_loop())
+            loop.run_until_complete(self.server_loop())
         except KeyboardInterrupt:
             pass
+        loop.close()
 
 
 if __name__ == "__main__":