diff --git a/NEWS b/NEWS
index 49679503dd10109729bc170c6082282c2a88f35a..0ec24fa8db20357afa68c7bb3aea4d17f38fc6f2 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,8 @@ documents those changes that are of interest to users and administrators.
  -- Allow AdminComment field to be changed by any Administrator.
  -- Fix key words in jobcomp select.
  -- MYSQL - Streamline job flush sql when doing a clean start on the slurmctld.
+ -- Fix potential infinite loop when talking to the DBD when shutting down
+    the slurmctld.
 
 * Changes in Slurm 17.02.1-2
 ============================
diff --git a/src/common/slurm_persist_conn.c b/src/common/slurm_persist_conn.c
index e1f4d09e2fed5cced354d4c8ce9d6fb4a16c798d..1806ae76806d02155172a250789d014461468bf3 100644
--- a/src/common/slurm_persist_conn.c
+++ b/src/common/slurm_persist_conn.c
@@ -891,11 +891,12 @@ extern Buf slurm_persist_recv_msg(slurm_persist_conn_t *persist_conn)
 	return buffer;
 
 endit:
-	/* Close it since we abondoned it.  If the connection does still exist
+	/* Close it since we abandoned it.  If the connection does still exist
 	 * on the other end we can't rely on it after this point since we didn't
 	 * listen long enough for this response.
 	 */
-	if (persist_conn->flags & PERSIST_FLAG_RECONNECT)
+	if (!(*persist_conn->shutdown) &&
+	    persist_conn->flags & PERSIST_FLAG_RECONNECT)
 		slurm_persist_conn_reopen(persist_conn, true);
 
 	return NULL;