[Neo-report] r2212 vincent - /trunk/neo/storage/handlers/identification.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 20 15:39:56 CEST 2010


Author: vincent
Date: Fri Aug 20 15:39:56 2010
New Revision: 2212

Log:
Don't call onConnectionClosed here.

onConnectionClosed is already called inside Connection.close() when peer
is identified (via setOnClose). Calling it here would trigger an exception
as it verifies that _connection is set before un-setting it.
As a replacement, verify that _connection is not set when
Connection.close() returns (so onConnectionClosed was actually called).

Modified:
    trunk/neo/storage/handlers/identification.py

Modified: trunk/neo/storage/handlers/identification.py
==============================================================================
--- trunk/neo/storage/handlers/identification.py [iso-8859-1] (original)
+++ trunk/neo/storage/handlers/identification.py [iso-8859-1] Fri Aug 20 15:39:56 2010
@@ -48,7 +48,7 @@ class IdentificationHandler(EventHandler
             elif node.isConnected():
                 # cut previous connection
                 node.getConnection().close()
-                node.onConnectionClosed()
+                assert not node.isConnected()
             node.setRunning()
         elif node_type == NodeTypes.STORAGE:
             from neo.storage.handlers.storage import StorageOperationHandler





More information about the Neo-report mailing list