Skip to content

Commit

Permalink
Merge pull request #330 from zenhack/minor-cleanup
Browse files Browse the repository at this point in the history
Minor cleanup
  • Loading branch information
zenhack authored Oct 24, 2022
2 parents 38685aa + bf0f5c7 commit 0d75b66
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -952,23 +952,14 @@ func (c *Conn) handleReturn(ctx context.Context, ret rpccp.Return, release capnp
// going on.
go func() {
switch {
case q.bootstrapPromise != nil && pr.err == nil:
case q.bootstrapPromise != nil:
syncutil.Without(&c.mu, func() {
q.p.Fulfill(pr.result)
q.bootstrapPromise.Fulfill(q.p.Answer().Client())
q.p.ReleaseClients()
release()
})
case q.bootstrapPromise != nil && pr.err != nil:
// TODO(someday): send unimplemented message back to remote if
// pr.unimplemented == true.
syncutil.Without(&c.mu, func() {
q.p.Reject(pr.err)
q.p.Resolve(pr.result, pr.err)
q.bootstrapPromise.Fulfill(q.p.Answer().Client())
q.p.ReleaseClients()
release()
})
case q.bootstrapPromise == nil && pr.err != nil:
case pr.err != nil:
// TODO(someday): send unimplemented message back to remote if
// pr.unimplemented == true.
syncutil.Without(&c.mu, func() {
Expand Down

0 comments on commit 0d75b66

Please sign in to comment.