fix(devices): release pendingMu on the pending-status path of CheckRegistrationStatus

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).
This commit is contained in:
John O'Keefe
2026-09-18 16:06:03 -04:00
parent 1cd8557b58
commit 5cdfe5a8dd
+1
View File
@@ -208,6 +208,7 @@ func (h *DeviceHandler) CheckRegistrationStatus(c *echo.Context) error {
return c.JSON(http.StatusOK, resp) return c.JSON(http.StatusOK, resp)
} }
pendingMu.Unlock()
return c.JSON(http.StatusOK, DeviceAuthStatusResponse{ return c.JSON(http.StatusOK, DeviceAuthStatusResponse{
Status: "pending", Status: "pending",