From 255c5cace1570e78210dda64992a2853c73ac490 Mon Sep 17 00:00:00 2001 From: Nathan Straz Date: Fri, 5 Sep 2014 17:15:53 -0400 Subject: [qarsh] Mark the node alive after we get a packet --- qarsh.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'qarsh.c') 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; -- cgit