summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2014-09-05 17:15:53 -0400
committerNathan Straz <nstraz@redhat.com>2014-09-05 17:15:53 -0400
commit255c5cace1570e78210dda64992a2853c73ac490 (patch)
treec688ce3b0e1eb0683a0d6086e8b049229f333244
parent625d114ca34228506046b0f6249b3af28878424c (diff)
downloadqarsh-255c5cace1570e78210dda64992a2853c73ac490.zip
qarsh-255c5cace1570e78210dda64992a2853c73ac490.tar.gz
qarsh-255c5cace1570e78210dda64992a2853c73ac490.tar.xz
[qarsh] Mark the node alive after we get a packet
-rw-r--r--qarsh.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/qarsh.c b/qarsh.c
index 3dea375..1f5e1db 100644
--- a/qarsh.c
+++ b/qarsh.c
@@ -299,12 +299,6 @@ run_remote_cmd(char *cmdline)
signal_to_send = 0;
}
} else if (nset > 0) {
- /* We got traffic, poke the state into the hbeat because
- * we may not have gotten the chance to call hbeat() above
- * which would normally reset the state for us.
- */
- hbeat_setstate(qarsh_hb, HOST_ALIVE);
-
if (nset && FD_ISSET(fileno(stdin), &rfds)) {
nbytes = read(fileno(stdin), buf, allowed_in);
if (nbytes >= 0) {
@@ -371,6 +365,11 @@ run_remote_cmd(char *cmdline)
fprintf(stderr, "recv_packet() returned NULL!\n");
break;
}
+ /* We got traffic, poke the state into the hbeat because
+ * we may not have gotten the chance to call hbeat() above
+ * which would normally reset the state for us.
+ */
+ hbeat_setstate(qarsh_hb, HOST_ALIVE);
if (qp->qp_type == QP_CMDEXIT) {
cmd_finished = 1;