From e7b12913b4d8dd2ce791b5ba6120675f8ecce559 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 23 Jan 2017 04:00:24 -0800 Subject: [PATCH] Ensure we properly set the "shutting down" flag so connection drops by downstream peers are properly handled. Signed-off-by: Ralph Castain --- orte/mca/grpcomm/direct/grpcomm_direct.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/orte/mca/grpcomm/direct/grpcomm_direct.c b/orte/mca/grpcomm/direct/grpcomm_direct.c index ae22d5f0d5..06397bed3d 100644 --- a/orte/mca/grpcomm/direct/grpcomm_direct.c +++ b/orte/mca/grpcomm/direct/grpcomm_direct.c @@ -367,9 +367,13 @@ static void xcast_recv(int status, orte_process_name_t* sender, /* peek at the command */ cnt=1; if (ORTE_SUCCESS == (ret = opal_dss.unpack(data, &command, &cnt, ORTE_DAEMON_CMD))) { - /* if it is add_procs, then... */ - if (ORTE_DAEMON_ADD_LOCAL_PROCS == command || - ORTE_DAEMON_DVM_NIDMAP_CMD == command) { + /* if it is an exit cmd, then flag that we are quitting so we will properly + * handle connection losses from our downstream peers */ + if (ORTE_DAEMON_EXIT_CMD == command || + ORTE_DAEMON_HALT_VM_CMD == command) { + orte_orteds_term_ordered = true; + } else if (ORTE_DAEMON_ADD_LOCAL_PROCS == command || + ORTE_DAEMON_DVM_NIDMAP_CMD == command) { /* extract the byte object holding the daemonmap */ cnt=1; if (ORTE_SUCCESS != (ret = opal_dss.unpack(data, &bo, &cnt, OPAL_BYTE_OBJECT))) {