Merge pull request #897 from starius/cleanup-without-cancel

loopin: use context.WithoutCancel in cleanup
This commit is contained in:
Boris Nagaev 2025-03-17 12:03:24 -03:00 committed by GitHub
commit a253b40062
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -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)
}

View file

@ -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: "+