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

refactor(core-api): use shorter default timeouts #3804

Merged
merged 3 commits into from
Jun 17, 2020
Merged

refactor(core-api): use shorter default timeouts #3804

merged 3 commits into from
Jun 17, 2020

Conversation

alessiodf
Copy link
Contributor

Summary

This PR stops a user from opening and keeping open multiple long lived TCP connections to the public API server which is enabled by default. It prevents server resource starvation by implementing a shorter maximum timeout (default: 5 seconds) so connections will be closed if no request is received after that time.

@ghost
Copy link

ghost commented Jun 16, 2020

Thanks for submitting this pull request! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@ghost ghost added Complexity: Low labels Jun 16, 2020
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #3804 into develop will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3804      +/-   ##
===========================================
+ Coverage    96.92%   97.28%   +0.36%     
===========================================
  Files          616      617       +1     
  Lines        14000    13908      -92     
  Branches      1688     1631      -57     
===========================================
- Hits         13570    13531      -39     
+ Misses         137      117      -20     
+ Partials       293      260      -33     
Flag Coverage Δ
#functional 6.43% <0.00%> (+0.04%) ⬆️
#integration 10.19% <100.00%> (+0.09%) ⬆️
#unit 95.26% <100.00%> (+0.34%) ⬆️
Impacted Files Coverage Δ
packages/core-api/src/server.ts 100.00% <100.00%> (ø)
packages/core-transaction-pool/src/utils.ts 93.75% <0.00%> (-2.81%) ⬇️
...nsactions/src/handlers/bridgechain-registration.ts 95.77% <0.00%> (-0.18%) ⬇️
packages/core-transaction-pool/src/errors.ts 100.00% <0.00%> (ø)
packages/core-transaction-pool/src/mempool.ts 97.67% <0.00%> (ø)
packages/core-transaction-pool/src/processor.ts 97.61% <0.00%> (ø)
...ckages/core-transaction-pool/src/sender-mempool.ts 100.00% <0.00%> (ø)
...te-transactions/src/handlers/magistrate-handler.ts 100.00% <0.00%> (ø)
...s/src/handlers/one/multi-signature-registration.ts 95.83% <0.00%> (ø)
packages/core-kernel/src/utils/lock.ts 100.00% <0.00%> (ø)
... and 19 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 b219609...22c99be. Read the comment docs.

@ghost
Copy link

ghost commented Jun 17, 2020

A collaborator has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait.

Thank you for your contribution!

@faustbrian faustbrian merged commit f4025bb into ArkEcosystem:develop Jun 17, 2020
@ghost
Copy link

ghost commented Jun 17, 2020

Your pull request has been merged. Thank you for your contribution to the ARK Ecosystem.

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

3 participants