Commit 5c657db7 authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

swapprotocol: don't wait for full close in emitcheque (#860)

parent 5215ac36
...@@ -186,9 +186,8 @@ func (s *Service) EmitCheque(ctx context.Context, peer swarm.Address, cheque *ch ...@@ -186,9 +186,8 @@ func (s *Service) EmitCheque(ctx context.Context, peer swarm.Address, cheque *ch
if err != nil { if err != nil {
_ = stream.Reset() _ = stream.Reset()
} else { } else {
// wait for full close // don't wait for full close to avoid deadlocks if cheques are sent simultaneously in both directions
// this ensure the accounting lock for this peer will be held long for the other peer to process the cheque go stream.FullClose()
_ = stream.FullClose()
} }
}() }()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment