mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopin: use context.WithoutCancel in cleanup
Ensure that MuSig2 cleanup does happen even if a context expires.
This commit is contained in:
parent
db090960b2
commit
c2dddf0dfe
2 changed files with 5 additions and 2 deletions
|
|
@ -418,7 +418,9 @@ func (f *FSM) cleanUpSessions(ctx context.Context,
|
|||
sessions []*input.MuSig2SessionInfo) {
|
||||
|
||||
for _, s := range sessions {
|
||||
err := f.cfg.Signer.MuSig2Cleanup(ctx, s.SessionID)
|
||||
err := f.cfg.Signer.MuSig2Cleanup(
|
||||
context.WithoutCancel(ctx), s.SessionID,
|
||||
)
|
||||
if err != nil {
|
||||
f.Warnf("unable to cleanup musig2 session: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,7 +360,8 @@ func (m *Manager) handleLoopInSweepReq(ctx context.Context,
|
|||
// We'll clean up the session if we don't get to signing.
|
||||
defer func() {
|
||||
err = m.cfg.Signer.MuSig2Cleanup(
|
||||
ctx, musig2Session.SessionID,
|
||||
context.WithoutCancel(ctx),
|
||||
musig2Session.SessionID,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("Error cleaning up musig2 session: "+
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue