[svn] commit: r3183 - /branches/trac216/src/bin/xfrin/xfrin.py.in

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Oct 12 09:36:12 UTC 2010


Author: shentingting
Date: Tue Oct 12 09:36:12 2010
New Revision: 3183

Log:
It did not update success, so committe again. add some comments, a DEFAULT_TRANSFERS_IN variable to remove hardcoding. delete connect function and a test function

Modified:
    branches/trac216/src/bin/xfrin/xfrin.py.in

Modified: branches/trac216/src/bin/xfrin/xfrin.py.in
==============================================================================
--- branches/trac216/src/bin/xfrin/xfrin.py.in (original)
+++ branches/trac216/src/bin/xfrin/xfrin.py.in Tue Oct 12 09:36:12 2010
@@ -27,7 +27,7 @@
 import select
 import random
 import time
-from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
+from errno import EWOULDBLOCK, ECONNRESET, \
         ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, errorcode
 
 from optparse import OptionParser, OptionValueError
@@ -92,15 +92,6 @@
         self._idle_timeout = idle_timeout
         self._verbose = verbose
         self._master_address = master_addrinfo[4]
-    
-    def connect(self, address):
-        try:
-            self._socket.connect(address)
-        except socket.error as why:
-            if why.args[0] in (EINPROGRESS, EALREADY, EWOULDBLOCK):
-                return 
-            if why.args[0] not in (0, EISCONN):
-                raise
 
     def send(self, data):
         try:
@@ -142,7 +133,7 @@
         '''Connect to master in TCP.'''
 
         try:
-            self.connect(self._master_address)
+            self._socket.connect(self._master_address)
             return True
         except socket.error as e:
             self.log_msg('Failed to connect:(%s), %s' % (self._master_address,
@@ -384,6 +375,10 @@
         self._cc_setup()
         self._shutdown_flag = 0
         self._verbose = verbose
+        #self._zones_to_threads: the key is zone name, the value is a thread
+        #which doing tranfer for this zone.
+        #self._conn_sockets_to_threads:the key is socket, the value is a xfr 
+        #thread. The mian thread uses this socket to communicate to this thread.
         self._zones_to_threads = {}
         self._conn_sockets_to_threads = {}
 




More information about the bind10-changes mailing list