BIND 10 trac419, updated. dadeedb633df1f3793c32fa283c82f22fcdb7ff4 [trac419] fix some minor issues according to review comments

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 1 14:57:28 UTC 2011


The branch, trac419 has been updated
       via  dadeedb633df1f3793c32fa283c82f22fcdb7ff4 (commit)
      from  91193e42d664fbb494a15cdf5b01a0c5da19d0b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dadeedb633df1f3793c32fa283c82f22fcdb7ff4
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date:   Tue Mar 1 22:56:23 2011 +0800

    [trac419] fix some minor issues according to review comments

-----------------------------------------------------------------------

Summary of changes:
 src/bin/xfrout/xfrout.py.in                        |    7 +++++++
 src/lib/python/isc/util/socketserver_mixin.py      |    3 +--
 .../isc/util/tests/socketserver_mixin_test.py      |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in
index b00a563..a987312 100644
--- a/src/bin/xfrout/xfrout.py.in
+++ b/src/bin/xfrout/xfrout.py.in
@@ -345,6 +345,13 @@ class UnixSockServer(socketserver_mixin.NoPollMixIn, ThreadingUnixStreamServer):
                                       % str(client_address))
                 break
 
+    def _handle_request_noblock(self):
+        """Overide the function _handle_request_noblock(), it create a new thread to
+        handle requests for each auth"""
+        td = threading.Thread(target=self.handle_request)
+        td.setDaemon(True)
+        td.start()
+
     def process_request(self, request):
         """Receive socket fd and query message from auth, then
         start a new thread to process the request."""
diff --git a/src/lib/python/isc/util/socketserver_mixin.py b/src/lib/python/isc/util/socketserver_mixin.py
index e9852c4..e954fe1 100644
--- a/src/lib/python/isc/util/socketserver_mixin.py
+++ b/src/lib/python/isc/util/socketserver_mixin.py
@@ -78,8 +78,7 @@ class NoPollMixIn:
             if self.__read_sock in r:
                 break
             else:
-                # Create a new thread to handle requests for each auth
-                threading.Thread(target=self.handle_request).start()
+                self._handle_request_noblock();
 
         self._is_shut_down.set()
 
diff --git a/src/lib/python/isc/util/tests/socketserver_mixin_test.py b/src/lib/python/isc/util/tests/socketserver_mixin_test.py
index 61bc248..a6686d8 100644
--- a/src/lib/python/isc/util/tests/socketserver_mixin_test.py
+++ b/src/lib/python/isc/util/tests/socketserver_mixin_test.py
@@ -25,7 +25,7 @@ class MyHandler(socketserver.BaseRequestHandler):
         data = self.request.recv(20)
         self.request.send(data)
 
-class MyServer(NoPollMixIn, 
+class MyServer(NoPollMixIn,
                socketserver.ThreadingMixIn,
                socketserver.TCPServer):
 




More information about the bind10-changes mailing list