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(core-p2p): limit max connection retries #3916

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

sebastijankuzner
Copy link
Contributor

Summary

This PR limits connection retries while making connection from infinity (default) to 1 retry. This fix removes repeated logs:
Socket error (peer ) : Connection terminated while waiting to connect, caused by infinite retries.

Number of retries can be increased to higher value if necessary.

Checklist

  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #3916 into develop will increase coverage by 83.78%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #3916       +/-   ##
============================================
+ Coverage    13.69%   97.48%   +83.78%     
============================================
  Files          628      628               
  Lines        14531    14531               
  Branches      1728     1728               
============================================
+ Hits          1990    14165    +12175     
+ Misses       12426      177    -12249     
- Partials       115      189       +74     
Flag Coverage Δ
#functional 6.77% <0.00%> (ø)
#integration 9.83% <0.00%> (ø)
#unit 95.71% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-p2p/src/peer-connector.ts 100.00% <100.00%> (+100.00%) ⬆️
...ore-test-framework/src/app/generators/generator.ts 100.00% <0.00%> (+5.88%) ⬆️
packages/core-test-framework/src/utils/api.ts 97.34% <0.00%> (+6.19%) ⬆️
packages/core-api/src/controllers/locks.ts 100.00% <0.00%> (+9.52%) ⬆️
packages/core-api/src/controllers/delegates.ts 100.00% <0.00%> (+10.81%) ⬆️
...re-test-framework/src/utils/transaction-factory.ts 98.86% <0.00%> (+11.93%) ⬆️
...s/core-test-framework/src/app/generators/crypto.ts 100.00% <0.00%> (+13.13%) ⬆️
packages/core-state/src/state-builder.ts 100.00% <0.00%> (+13.63%) ⬆️
...s/core-api/src/resources/transaction-with-block.ts 100.00% <0.00%> (+15.38%) ⬆️
packages/core-api/src/plugins/rate-limit.ts 100.00% <0.00%> (+16.66%) ⬆️
... and 559 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95d6b2c...5ef536a. Read the comment docs.

@air1one air1one merged commit 184f500 into develop Jul 24, 2020
@ghost ghost deleted the fix/core-p2p/infinite-connection branch July 24, 2020 14:22
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.

None yet

2 participants