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: add support for dns timeout #527

Merged
merged 8 commits into from
Dec 14, 2022
Merged

Conversation

ulbqb
Copy link
Member

@ulbqb ulbqb commented Dec 12, 2022

Description

When requesting information from an external system, like DNS, the caller should always consider a timeout period for the operation to finish. The current implementation lacks timeout control since it uses context.Background().

@ulbqb ulbqb self-assigned this Dec 12, 2022
@ulbqb ulbqb added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Dec 12, 2022
@ulbqb ulbqb requested a review from Mdaiki0730 December 12, 2022 05:41
@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Merging #527 (9f9998a) into main (7ba5191) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
- Coverage   65.99%   65.99%   -0.01%     
==========================================
  Files         279      279              
  Lines       38028    38035       +7     
==========================================
+ Hits        25097    25101       +4     
- Misses      11129    11132       +3     
  Partials     1802     1802              
Impacted Files Coverage Δ
p2p/transport.go 84.02% <100.00%> (+1.24%) ⬆️
statesync/snapshots.go 93.71% <0.00%> (-1.26%) ⬇️
consensus/reactor.go 74.66% <0.00%> (-1.06%) ⬇️
types/block.go 76.34% <0.00%> (-0.77%) ⬇️
p2p/pex/pex_reactor.go 79.67% <0.00%> (-0.62%) ⬇️
consensus/state.go 73.24% <0.00%> (-0.30%) ⬇️
crypto/vrf/vrf_r2ishiguro.go 100.00% <0.00%> (ø)
p2p/switch.go 66.52% <0.00%> (+0.61%) ⬆️
types/voter_set.go 86.63% <0.00%> (+0.83%) ⬆️
abci/client/socket_client.go 72.96% <0.00%> (+0.87%) ⬆️
... and 3 more

@ulbqb ulbqb marked this pull request as ready for review December 12, 2022 06:35
tnasu
tnasu previously approved these changes Dec 12, 2022
go.mod Outdated Show resolved Hide resolved
p2p/transport.go Outdated Show resolved Hide resolved
p2p/transport_test.go Outdated Show resolved Hide resolved
@ulbqb ulbqb requested a review from torao December 12, 2022 10:58
p2p/transport_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@torao torao left a comment

Choose a reason for hiding this comment

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

LGTM

@ulbqb ulbqb merged commit db728ec into Finschia:main Dec 14, 2022
@ulbqb ulbqb deleted the fix/transport_timeout branch December 14, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants