From 5cdfe5a8dd537ff828327d737c1cd2bed3b4c8fd Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 18 Sep 2026 16:06:03 -0400 Subject: [PATCH] fix(devices): release pendingMu on the pending-status path of CheckRegistrationStatus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mutex hardening added a fall-through 'pending' response path that returned while still holding pendingMu — one status poll before approval leaked the lock and every later register/approve/status request hung forever (caught by TestDeviceRegistrationFlow's approve step hanging). --- internal/handlers/devices.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/handlers/devices.go b/internal/handlers/devices.go index 324eace..bba28b6 100644 --- a/internal/handlers/devices.go +++ b/internal/handlers/devices.go @@ -208,6 +208,7 @@ func (h *DeviceHandler) CheckRegistrationStatus(c *echo.Context) error { return c.JSON(http.StatusOK, resp) } + pendingMu.Unlock() return c.JSON(http.StatusOK, DeviceAuthStatusResponse{ Status: "pending",