Browse Source

Fix the code error which make xfrin doesn't work, socket map should be passed to asyncore.loop(). (patch is created by Jinmei, reviewed by Jeremy and me.)

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2038 e5f2f494-b856-4b98-b285-d166d9295462
Likun Zhang 15 years ago
parent
commit
26291a118c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/bin/xfrin/xfrin.py.in

+ 5 - 5
src/bin/xfrin/xfrin.py.in

@@ -76,6 +76,7 @@ class XfrinConnection(asyncore.dispatcher):
         asyncore.dispatcher.__init__(self, map=sock_map)
         self.create_socket(master_addrinfo[0], master_addrinfo[1])
         self._zone_name = zone_name
+        self._sock_map = sock_map
         self._rrclass = rrclass
         self._db_file = db_file
         self._soa_rr_count = 0
@@ -131,11 +132,10 @@ class XfrinConnection(asyncore.dispatcher):
 
     def _asyncore_loop(self):
         '''
-This method is a trivial wrapper for asyncore.loop().  It's extracted from
-_get_request_response so that we can test the rest of the code without
-involving actual communication with a remote server.
-'''
-        asyncore.loop(self._idle_timeout, count = 1)
+        This method is a trivial wrapper for asyncore.loop().  It's extracted from
+        _get_request_response so that we can test the rest of the code without
+        involving actual communication with a remote server.'''
+        asyncore.loop(self._idle_timeout, map = self._sock_map, count = 1)
     
     def _get_request_response(self, size):
         recv_size = 0