Skip to content

Commit

Permalink
Merge pull request #441 from zenhack/handleDisembargo-withLocked
Browse files Browse the repository at this point in the history
syncutil.With -> Conn.withLocked
  • Loading branch information
lthibault authored Jan 31, 2023
2 parents 31d2460 + 00abcab commit b138dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ func (c *Conn) handleDisembargo(ctx context.Context, d rpccp.Disembargo, release
client capnp.Client
)

syncutil.With(&c.lk, func() {
c.withLocked(func(c *lockedConn) {
if tgt.which != rpccp.MessageTarget_Which_promisedAnswer {
err = rpcerr.Failed(errors.New("incoming disembargo: sender loopback: target is not a promised answer"))
return
Expand Down

0 comments on commit b138dc0

Please sign in to comment.