Rev 6199: Some cleanups in http://bazaar.launchpad.net/~jameinel/bzr/2.5-soft-hangup-795025

John Arbash Meinel john at arbash-meinel.com
Mon Sep 26 10:44:57 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-soft-hangup-795025

------------------------------------------------------------
revno: 6199
revision-id: john at arbash-meinel.com-20110926104447-1wo6rhxpqei3xz7z
parent: john at arbash-meinel.com-20110926075826-jd7vv1a9cmpe7fg9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-soft-hangup-795025
timestamp: Mon 2011-09-26 12:44:47 +0200
message:
  Some cleanups
-------------- next part --------------
=== modified file 'bzrlib/smart/server.py'
--- a/bzrlib/smart/server.py	2011-09-26 07:58:26 +0000
+++ b/bzrlib/smart/server.py	2011-09-26 10:44:47 +0000
@@ -164,12 +164,6 @@
             hook(backing_urls, self.get_url())
 
     def _stop_gracefully(self):
-        # XXX: ATM, once we see the self._should_terminate we immediately exit
-        #      without waiting for client threads to shut down. (I don't know
-        #      if we *can* because they are marked as Daemon.)
-        #      Which means that while in-theory this is a graceful shutdown,
-        #      because we don't actively close the connections, etc, we don't
-        #      have a good way (yet) to poll the spawned clients and
         trace.note(gettext('Requested to stop gracefully'))
         self._should_terminate = True
         self._gracefully_stopping = True
@@ -216,8 +210,9 @@
                         pass
                     except self._socket_error, e:
                         # if the socket is closed by stop_background_thread
-                        # we might get a EBADF here, any other socket errors
-                        # should get logged.
+                        # we might get a EBADF here, or if we get a signal we
+                        # can get EINTR, any other socket errors should get
+                        # logged.
                         if e.args[0] not in (errno.EBADF, errno.EINTR):
                             trace.warning(gettext("listening socket error: %s")
                                           % (e,))



More information about the bazaar-commits mailing list