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

Ensure SyncRequest never returns nil, even if context is closed #48

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Sep 28, 2023

// In all return paths *including error paths* the RPCResponse is populated

... we say it, but then we return nil if the context is closed

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

Codecov Report

Merging #48 (a5e84e1) into main (038e29f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #48   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2706      2707    +1     
=========================================
+ Hits          2706      2707    +1     
Files Coverage Δ
pkg/rpcbackend/backend.go 100.00% <100.00%> (ø)

Copy link
Contributor

@nguyer nguyer left a comment

Choose a reason for hiding this comment

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

I'll make sure this gets added to the websocket version of this that I'm working on too 🙂

@nguyer nguyer merged commit be29668 into main Sep 28, 2023
2 checks passed
@nguyer nguyer deleted the nil-res branch September 28, 2023 18:19
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.

3 participants