From 0a91fdf85f0808d93e1d8750225dc2a8e4fe4220 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 19 Aug 2014 19:48:24 +0000 Subject: [PATCH] If an initial address fails to connect, record that fact and attempt the next address for that proc. If nothing succeeds, then declare failure. cmr=v1.8.2:reviewer=edgar This commit was SVN r32553. --- orte/mca/oob/tcp/oob_tcp_connection.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/orte/mca/oob/tcp/oob_tcp_connection.c b/orte/mca/oob/tcp/oob_tcp_connection.c index ac16e2056f..741dc4d40d 100644 --- a/orte/mca/oob/tcp/oob_tcp_connection.c +++ b/orte/mca/oob/tcp/oob_tcp_connection.c @@ -801,6 +801,14 @@ void mca_oob_tcp_peer_close(mca_oob_tcp_peer_t *peer) /* release the socket */ close(peer->sd); + /* if we were CONNECTING, then we need to mark the address as + * failed and cycle back to try the next address */ + if (MCA_OOB_TCP_CONNECTING == peer->state) { + peer->active_addr->state = MCA_OOB_TCP_FAILED; + ORTE_ACTIVATE_TCP_CONN_STATE(peer, mca_oob_tcp_peer_try_connect); + return; + } + /* inform the component-level that we have lost a connection so * it can decide what to do about it. */