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
if err != nil {
_ = stream.Reset()
} else {
// wait for full close
// this ensure the accounting lock for this peer will be held long for the other peer to process the cheque
_ = stream.FullClose()
// don't wait for full close to avoid deadlocks if cheques are sent simultaneously in both directions
go 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