Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sekulicd committed Feb 6, 2025
1 parent 024a47c commit 99eaa52
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/internal/core/application/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ func (m *forfeitTxsMap) sign(txs []string) error {
}

if m.allSigned() {
m.doneCh <- struct{}{}
select {
case m.doneCh <- struct{}{}:
default:
}
}

return nil
Expand All @@ -325,6 +328,7 @@ func (m *forfeitTxsMap) reset() {

m.forfeitTxs = make(map[domain.VtxoKey][]string)
m.connectors = nil
m.doneCh = make(chan struct{}, 1)
}

func (m *forfeitTxsMap) pop() ([]string, error) {
Expand All @@ -333,7 +337,7 @@ func (m *forfeitTxsMap) pop() ([]string, error) {
m.lock.Unlock()
m.reset()
}()

txs := make([]string, 0)
for vtxoKey, signed := range m.forfeitTxs {
if len(signed) == 0 {
Expand Down

0 comments on commit 99eaa52

Please sign in to comment.