[server/pyro] try to shutdown the repository properly stable
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 04 Dec 2013 19:14:43 +0100
branchstable
changeset 9353 aa8be290374e
parent 9352 26c979b24196
child 9354 523273da6738
[server/pyro] try to shutdown the repository properly If RepositoryServer.trigger_events is not called we might miss a QuitEvent and thus never shutdown the repository and its looping tasks.
server/server.py
--- a/server/server.py	Wed Dec 11 16:56:18 2013 +0100
+++ b/server/server.py	Wed Dec 04 19:14:43 2013 +0100
@@ -109,7 +109,8 @@
                 self.daemon.handleRequests(req_timeout)
             except select.error:
                 continue
-            self.trigger_events()
+            finally:
+                self.trigger_events()
 
     def quit(self):
         """stop the server"""