Added arbitrary timeout on Pyro, to force it to free memory after disconnect.
authorEdouard Tisserant
Mon, 08 Jan 2018 11:09:02 +0100
changeset 1888 5b3e17d0957c
parent 1887 1b9907ef770b
child 1889 baff54446535
Added arbitrary timeout on Pyro, to force it to free memory after disconnect.
Beremiz_service.py
--- a/Beremiz_service.py	Fri Jan 05 15:39:02 2018 +0100
+++ b/Beremiz_service.py	Mon Jan 08 11:09:02 2018 +0100
@@ -414,6 +414,8 @@
         while self.continueloop:
             pyro.initServer()
             self.daemon = pyro.Daemon(host=self.ip_addr, port=self.port)
+            # pyro never frees memory after connection close if no timeout set 
+            self.daemon.setTimeout(1);
             self.Start()
             self.daemon.requestLoop()
             self.daemon.sock.close()