diff --git a/pkg/discovery/approve.go b/pkg/discovery/approve.go index 47191c4..c6b8f72 100644 --- a/pkg/discovery/approve.go +++ b/pkg/discovery/approve.go @@ -68,8 +68,10 @@ func (a *approver[T]) confirm(ctx context.Context, d *provisionalDevice[T]) erro // canceled and the other approver didn't close the stop chan. select { case <-ctx.Done(): + a.ioLock.Unlock() return ctx.Err() case <-a.stop: + a.ioLock.Unlock() return nil default: }