From a05d4416ef01403178a29433492e07e663bde896 Mon Sep 17 00:00:00 2001 From: Lev Brouk Date: Thu, 28 Sep 2023 12:02:35 -0700 Subject: [PATCH] PR feedback: nit --- server/mqtt_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/mqtt_test.go b/server/mqtt_test.go index 51629bc9..6ab76f19 100644 --- a/server/mqtt_test.go +++ b/server/mqtt_test.go @@ -4670,11 +4670,11 @@ func TestMQTTLockedSession(t *testing.T) { // It is possible, however unlikely, to have received CONNACK while // mqttProcessConnect is still running, and the session remains locked. Wait // for it to finish. - stillLocked := true - for stillLocked { + for stillLocked := true; stillLocked; { asm.mu.RLock() _, stillLocked = asm.sessLocked["sub"] asm.mu.RUnlock() + if stillLocked { time.Sleep(1 * time.Millisecond) }