[Zodb-checkins] SVN: ZODB/trunk/src/ Bug fixed

Jim Fulton jim at zope.com
Thu Sep 30 14:00:05 EDT 2010


Log message for revision 117093:
  Bug fixed
  - Changes to suppprt IPv6 broke a fix for a problem on Mac OS X that
    could cause a server to stop accepting connections.
  

Changed:
  U   ZODB/trunk/src/CHANGES.txt
  U   ZODB/trunk/src/ZEO/zrpc/server.py

-=-
Modified: ZODB/trunk/src/CHANGES.txt
===================================================================
--- ZODB/trunk/src/CHANGES.txt	2010-09-30 15:44:19 UTC (rev 117092)
+++ ZODB/trunk/src/CHANGES.txt	2010-09-30 18:00:04 UTC (rev 117093)
@@ -19,6 +19,9 @@
 - When mulri-database connections were no longer used and cleaned up,
   their subconnections weren't cleaned up properly.
 
+- Changes to suppprt IPv6 broke a fix for a problem on Mac OS X that
+  could cause a server to stop accepting connections.
+
 3.10.0b7 (2010-09-28)
 =====================
 

Modified: ZODB/trunk/src/ZEO/zrpc/server.py
===================================================================
--- ZODB/trunk/src/ZEO/zrpc/server.py	2010-09-30 15:44:19 UTC (rev 117092)
+++ ZODB/trunk/src/ZEO/zrpc/server.py	2010-09-30 18:00:04 UTC (rev 117093)
@@ -87,8 +87,6 @@
             log("accepted failed: %s" % msg)
             return
 
-        # Drop flow-info from IPv6 addresses
-        addr = addr[:2]
 
         # We could short-circuit the attempt below in some edge cases
         # and avoid a log message by checking for addr being None.
@@ -101,6 +99,10 @@
         # It might be better to check whether the socket has been
         # closed, but I don't see a way to do that. :(
 
+        # Drop flow-info from IPv6 addresses
+        if addr: # Sometimes None on Mac. See above.
+            addr = addr[:2]
+
         try:
             c = self.factory(sock, addr)
         except:



More information about the Zodb-checkins mailing list