Skip to content

Commit 0a5d3a5

Browse files
committed
Merge pull request open-mpi#1058 from ggouaillardet/topic/v2.x/oob_usock_fixes
Topic/v2.x/oob usock fixes
2 parents c35b482 + 3e4a706 commit 0a5d3a5

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

@@ -769,6 +769,7 @@ void mca_oob_usock_peer_close(mca_oob_usock_peer_t *peer)
769769

770770
/* release the socket */
771771
close(peer->sd);
772+
peer->sd = -1;
772773

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

0 commit comments

Comments
 (0)