From fc7ddd91d1f086520f1b54e33a01de89192e7491 Mon Sep 17 00:00:00 2001
From: Jason Booth <jbooth@schedmd.com>
Date: Tue, 2 Oct 2018 14:30:26 -0600
Subject: [PATCH] Fix correct timeout with resends in slurm_send_only_node_msg.

Continuation of 06582da8ff4713 (17.11.9)

Poll was timing out too quickly due to an incorrect conversion of
MessageTimeout. Added a multiplier so timeout reflects the correct
millisecond value.

Bug 5553
---
 NEWS                            | 1 +
 src/common/slurm_protocol_api.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 0c6470fe314..fd315d42d92 100644
--- a/NEWS
+++ b/NEWS
@@ -53,6 +53,7 @@ documents those changes that are of interest to users and administrators.
  -- When updating an association and are unable to find parent association
     initialize old fairshare association pointer correctly.
  -- Wrap slurm_cond_signal() calls with mutexes where needed.
+ -- Fix correct timeout with resends in slurm_send_only_node_msg.
 
 * Changes in Slurm 17.11.9-2
 ============================
diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 5ecbe6ec6fd..652c2b8e3db 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -4532,7 +4532,7 @@ int slurm_send_only_node_msg(slurm_msg_t *req)
 	int rc = SLURM_SUCCESS;
 	int fd = -1;
 	struct pollfd pfd;
-	int timeout = slurm_get_msg_timeout();
+	int timeout = (slurm_get_msg_timeout() * 1000);
 	int value = -1;
 	int pollrc;
 
-- 
GitLab