Skip to content

Commit 74293bc

Browse files
author
rhc54
committed
Merge pull request #1519 from ggouaillardet/poc/oob_usock
Poc/oob usock
2 parents 6f45063 + d757fbb commit 74293bc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

orte/mca/oob/usock/oob_usock.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ static void process_send(int fd, short args, void *cbdata)
316316
goto cleanup;
317317
}
318318

319+
if (MCA_OOB_USOCK_CLOSED == peer->state) {
320+
/* the peer has gone, it will never come back */
321+
goto cleanup;
322+
}
319323
/* add the message to the queue for sending after the
320324
* connection is formed
321325
*/

orte/mca/oob/usock/oob_usock_connection.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
1616
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
17-
* Copyright (c) 2014 Research Organization for Information Science
17+
* Copyright (c) 2014-2016 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* $COPYRIGHT$
2020
*
@@ -85,7 +85,7 @@ static int usock_peer_create_socket(mca_oob_usock_peer_t* peer)
8585
{
8686
int flags;
8787

88-
if (peer->sd > 0) {
88+
if (peer->sd >=0) {
8989
return ORTE_SUCCESS;
9090
}
9191

@@ -771,6 +771,7 @@ void mca_oob_usock_peer_close(mca_oob_usock_peer_t *peer)
771771

772772
/* release the socket */
773773
close(peer->sd);
774+
peer->sd = -1;
774775

775776
/* inform the component-level that we have lost a connection so
776777
* it can decide what to do about it.

0 commit comments

Comments
 (0)