Skip to content

sendCap: check for nil exports table/entries#113

Merged
zombiezen merged 1 commit into
capnproto:v3from
zenhack:fix-112
Apr 4, 2018
Merged

sendCap: check for nil exports table/entries#113
zombiezen merged 1 commit into
capnproto:v3from
zenhack:fix-112

Conversation

@zenhack

@zenhack zenhack commented Apr 3, 2018

Copy link
Copy Markdown
Contributor

Fixes #112

Note that I'm not terribly confident that this is the best thing to do; it seems like maybe exports should be initialized to an empty slice up front somwhere (doing it lazily here feels wrong) but I'm fuzzy on where that would be.

@zombiezen zombiezen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It would be nice to have a test for this, but all the ideas I have for triggering it would be pretty burdensome to ask you to write, so we can skip.

Comment thread rpc/export.go Outdated
// TODO(someday): Check for pipeline client on question for receiverAnswer.

// Default to sender-hosted (export).
if c.exports == nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary, the for loop would just skip over it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@zombiezen zombiezen merged commit 2ea433a into capnproto:v3 Apr 4, 2018
@zenhack zenhack deleted the fix-112 branch April 4, 2018 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants