Skip to content

Commit a253b40

Browse files
authored
Merge pull request #897 from starius/cleanup-without-cancel
loopin: use context.WithoutCancel in cleanup
2 parents db09096 + c2dddf0 commit a253b40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

staticaddr/loopin/actions.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ func (f *FSM) cleanUpSessions(ctx context.Context,
418418
sessions []*input.MuSig2SessionInfo) {
419419

420420
for _, s := range sessions {
421-
err := f.cfg.Signer.MuSig2Cleanup(ctx, s.SessionID)
421+
err := f.cfg.Signer.MuSig2Cleanup(
422+
context.WithoutCancel(ctx), s.SessionID,
423+
)
422424
if err != nil {
423425
f.Warnf("unable to cleanup musig2 session: %v", err)
424426
}

staticaddr/loopin/manager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ func (m *Manager) handleLoopInSweepReq(ctx context.Context,
360360
// We'll clean up the session if we don't get to signing.
361361
defer func() {
362362
err = m.cfg.Signer.MuSig2Cleanup(
363-
ctx, musig2Session.SessionID,
363+
context.WithoutCancel(ctx),
364+
musig2Session.SessionID,
364365
)
365366
if err != nil {
366367
log.Errorf("Error cleaning up musig2 session: "+

0 commit comments

Comments
 (0)