From 0db2967214b19faff744b71b7f958dc87ed85f98 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 27 Jan 2025 16:39:14 +0800 Subject: [PATCH] :bug: Trying to fix ack message issue --- pkg/internal/services/factors.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/internal/services/factors.go b/pkg/internal/services/factors.go index 5d57d86..8afa6bc 100644 --- a/pkg/internal/services/factors.go +++ b/pkg/internal/services/factors.go @@ -138,7 +138,9 @@ func CheckFactor(factor models.AuthFactor, code string) error { return fmt.Errorf("invalid verification code") } log.Info().Uint("factor", factor.ID).Str("secret", code).Msg("Verified one-time-password...") - msg.Ack() + if err := msg.AckSync(); err != nil { + log.Warn().Err(err).Uint("factor", factor.ID).Msg("Failed to acknowledge message when validating factor code...") + } return nil }