diff --git a/src/plugins/auth/munge/auth_munge.c b/src/plugins/auth/munge/auth_munge.c
index 46ac99dc3f620fe794d80fa9828984efb5e6bf8c..6866c65ac10ff83c3b5ac1a9603837f807cd7ad7 100644
--- a/src/plugins/auth/munge/auth_munge.c
+++ b/src/plugins/auth/munge/auth_munge.c
@@ -452,7 +452,7 @@ _decode_cred(char *m, slurm_auth_credential_t *c)
 		error ("Munge decode failed: %s %s", 
 			munge_ctx_strerror(ctx), retry ? "(retrying ...)": "");
 
-		if ((e = EMUNGE_SOCKET) && retry--)
+		if ((e == EMUNGE_SOCKET) && retry--)
 			goto again;
 
 		/*