Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/nil exc check fails #268

Merged
merged 2 commits into from
Jul 23, 2022
Merged
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
8 changes: 6 additions & 2 deletions rpc/answer.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ func (c *Conn) newReturn(ctx context.Context) (rpccp.Return, func(), capnp.Relea
send: send,
release: release,
callback: func(err error) {
c.er.ReportError(fmt.Errorf("send return: %w", err))
if err != nil {
c.er.ReportError(fmt.Errorf("send return: %w", err))
}
},
})
}, release, nil
Expand Down Expand Up @@ -232,7 +234,9 @@ func (ans *answer) sendReturn() (releaseList, error) {

var err error
ans.exportRefs, err = ans.c.fillPayloadCapTable(ans.results, ans.resultCapTable)
ans.c.er.ReportError(rpcerr.Annotate(err, "send return")) // nop if err == nil
if err != nil {
ans.c.er.ReportError(rpcerr.Annotate(err, "send return"))
}
// Continue. Don't fail to send return if cap table isn't fully filled.

select {
Expand Down