Skip to content

Commit a61f7bd

Browse files
author
Ralph Castain
authored
Merge pull request #2780 from rhc54/topic/conn
Ensure we properly set the "shutting down" flag so connection drops by downstream peers are properly handled.
2 parents 0b4648b + e7b1291 commit a61f7bd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

orte/mca/grpcomm/direct/grpcomm_direct.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,13 @@ static void xcast_recv(int status, orte_process_name_t* sender,
367367
/* peek at the command */
368368
cnt=1;
369369
if (ORTE_SUCCESS == (ret = opal_dss.unpack(data, &command, &cnt, ORTE_DAEMON_CMD))) {
370-
/* if it is add_procs, then... */
371-
if (ORTE_DAEMON_ADD_LOCAL_PROCS == command ||
372-
ORTE_DAEMON_DVM_NIDMAP_CMD == command) {
370+
/* if it is an exit cmd, then flag that we are quitting so we will properly
371+
* handle connection losses from our downstream peers */
372+
if (ORTE_DAEMON_EXIT_CMD == command ||
373+
ORTE_DAEMON_HALT_VM_CMD == command) {
374+
orte_orteds_term_ordered = true;
375+
} else if (ORTE_DAEMON_ADD_LOCAL_PROCS == command ||
376+
ORTE_DAEMON_DVM_NIDMAP_CMD == command) {
373377
/* extract the byte object holding the daemonmap */
374378
cnt=1;
375379
if (ORTE_SUCCESS != (ret = opal_dss.unpack(data, &bo, &cnt, OPAL_BYTE_OBJECT))) {

0 commit comments

Comments
 (0)