Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rpc/question.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (c *Conn) newQuestion(method capnp.Method) *question {
q := &question{
c: c,
id: questionID(c.questionID.next()),
release: func() {},
finishMsgSend: make(chan struct{}),
}
q.p = capnp.NewPromise(method, q) // TODO(someday): customize error message for bootstrap
Expand Down
3 changes: 0 additions & 3 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ func (c *Conn) handleReturn(ctx context.Context, ret rpccp.Return, release capnp
go func() {
switch {
case q.bootstrapPromise != nil && pr.err == nil:
q.release = func() {}
syncutil.Without(&c.mu, func() {
q.p.Fulfill(pr.result)
q.bootstrapPromise.Fulfill(q.p.Answer().Client())
Expand All @@ -958,7 +957,6 @@ func (c *Conn) handleReturn(ctx context.Context, ret rpccp.Return, release capnp
case q.bootstrapPromise != nil && pr.err != nil:
// TODO(someday): send unimplemented message back to remote if
// pr.unimplemented == true.
q.release = func() {}
syncutil.Without(&c.mu, func() {
q.p.Reject(pr.err)
q.bootstrapPromise.Fulfill(q.p.Answer().Client())
Expand All @@ -968,7 +966,6 @@ func (c *Conn) handleReturn(ctx context.Context, ret rpccp.Return, release capnp
case q.bootstrapPromise == nil && pr.err != nil:
// TODO(someday): send unimplemented message back to remote if
// pr.unimplemented == true.
q.release = func() {}
syncutil.Without(&c.mu, func() {
q.p.Reject(pr.err)
release()
Expand Down