[Zodb-checkins] SVN: ZODB/branches/3.8.0b5/src/ZEO/zrpc/connection.py Fixed bug that can cause the asyncore client loop to fail.

Jim Fulton jim at zope.com
Sat Nov 17 12:53:37 EST 2007


Log message for revision 81897:
  Fixed bug that can cause the asyncore client loop to fail.
  

Changed:
  U   ZODB/branches/3.8.0b5/src/ZEO/zrpc/connection.py

-=-
Modified: ZODB/branches/3.8.0b5/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/branches/3.8.0b5/src/ZEO/zrpc/connection.py	2007-11-17 17:32:16 UTC (rev 81896)
+++ ZODB/branches/3.8.0b5/src/ZEO/zrpc/connection.py	2007-11-17 17:53:36 UTC (rev 81897)
@@ -82,7 +82,10 @@
                     continue
 
             if not (r or w or e):
-                for obj in client_map.itervalues():
+                # The line intentionally doesn't use iterators. Other
+                # threads can close dispatchers, causeing the socket
+                # map to shrink.
+                for obj in client_map.values():
                     if isinstance(obj, Connection):
                         # Send a heartbeat message as a reply to a
                         # non-existent message id.



More information about the Zodb-checkins mailing list