[Neo-report] r2635 vincent - /trunk/neo/client/pool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 24 15:17:36 CET 2011
Author: vincent
Date: Mon Jan 24 15:17:36 2011
New Revision: 2635
Log:
Remove unneeded connection state checks.
Since r2357 "ask" atomically checks connection state before sending, so early
check & locking are not needed here anymore.
Modified:
trunk/neo/client/pool.py
Modified: trunk/neo/client/pool.py
==============================================================================
--- trunk/neo/client/pool.py [iso-8859-1] (original)
+++ trunk/neo/client/pool.py [iso-8859-1] Mon Jan 24 15:17:36 2011
@@ -65,22 +65,10 @@ class ConnectionPool(object):
node.getState())
conn = MTClientConnection(app.em, app.storage_event_handler, addr,
connector=app.connector_handler(), dispatcher=app.dispatcher)
- conn.lock()
-
+ p = Packets.RequestIdentification(NodeTypes.CLIENT,
+ app.uuid, None, app.name)
try:
- if conn.getConnector() is None:
- # This happens, if a connection could not be established.
- neo.lib.logging.error('Connection to %r failed', node)
- self.notifyFailure(node)
- return None
-
- p = Packets.RequestIdentification(NodeTypes.CLIENT,
- app.uuid, None, app.name)
msg_id = conn.ask(p, queue=app.local_var.queue)
- finally:
- conn.unlock()
-
- try:
app._waitMessage(conn, msg_id,
handler=app.storage_bootstrap_handler)
except ConnectionClosed:
More information about the Neo-report
mailing list