Skip to content

Commit

Permalink
fix unexpected race in tx subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
libotony committed Jul 18, 2023
1 parent e664012 commit 9f031b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/subscriptions/pending_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (p *pendingTx) DispatchLoop(done <-chan struct{}) {

func (p *pendingTx) dispatch(tx *tx.Transaction, done <-chan struct{}) {
p.mu.RLock()
defer p.mu.Unlock()
defer p.mu.RUnlock()

for lsn := range p.listeners {
select {
Expand Down

0 comments on commit 9f031b9

Please sign in to comment.