mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
HA: context used to start transaction must not be canceled before the transaction is committed
This was introduced by 621c1b9537 and leads to
tx.Commit() always returning an "context canceled" error.
This commit is contained in:
parent
2a8fc05ddb
commit
31aed435cc
1 changed files with 3 additions and 2 deletions
|
|
@ -233,14 +233,15 @@ func (h *HA) realize(s *icingaredisv1.IcingaStatus, t *types.UnixMilli, shouldLo
|
|||
}
|
||||
}
|
||||
|
||||
cancel()
|
||||
|
||||
if err := tx.Commit(); err != nil {
|
||||
cancel()
|
||||
return err
|
||||
}
|
||||
if takeover {
|
||||
h.signalTakeover()
|
||||
}
|
||||
|
||||
cancel()
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue