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

fix: catch errored push of rpc #334

Merged
merged 1 commit into from
Aug 24, 2022
Merged

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Aug 24, 2022

In #325 , pushing an rpc thru the outbound stream can now throw.

This error should be caught to avoid interrupting publishing and forwarding messages.

@wemeetagain wemeetagain requested a review from a team as a code owner August 24, 2022 19:00
@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2022

Codecov Report

Base: 79.80% // Head: 79.74% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (5dcb654) compared to base (7ff13d0).
Patch coverage: 20.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
- Coverage   79.80%   79.74%   -0.06%     
==========================================
  Files          44       44              
  Lines       11082    11096      +14     
  Branches     1013     1016       +3     
==========================================
+ Hits         8844     8849       +5     
- Misses       2238     2247       +9     
Impacted Files Coverage Δ
src/index.ts 70.26% <20.00%> (-0.18%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wemeetagain wemeetagain merged commit 64cf477 into master Aug 24, 2022
@wemeetagain wemeetagain deleted the fix/catch-errored-push-rpc branch August 24, 2022 19:09
this.gossip.set(id, ihave)
}

return false
Copy link
Contributor

Choose a reason for hiding this comment

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

@wemeetagain instead of having to throw an error, why don't we do the "stream is full" check here? try / catch needlessly is expensive

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