mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Merge pull request #897 from starius/cleanup-without-cancel
loopin: use context.WithoutCancel in cleanup
This commit is contained in:
commit
a253b40062
2 changed files with 5 additions and 2 deletions
|
|
@ -418,7 +418,9 @@ func (f *FSM) cleanUpSessions(ctx context.Context,
|
||||||
sessions []*input.MuSig2SessionInfo) {
|
sessions []*input.MuSig2SessionInfo) {
|
||||||
|
|
||||||
for _, s := range sessions {
|
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 {
|
if err != nil {
|
||||||
f.Warnf("unable to cleanup musig2 session: %v", err)
|
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.
|
// We'll clean up the session if we don't get to signing.
|
||||||
defer func() {
|
defer func() {
|
||||||
err = m.cfg.Signer.MuSig2Cleanup(
|
err = m.cfg.Signer.MuSig2Cleanup(
|
||||||
ctx, musig2Session.SessionID,
|
context.WithoutCancel(ctx),
|
||||||
|
musig2Session.SessionID,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error cleaning up musig2 session: "+
|
log.Errorf("Error cleaning up musig2 session: "+
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue