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(header/p2p): set deadline on a request to peer #1592

Closed
wants to merge 1 commit into from

Conversation

Wondertan
Copy link
Member

No description provided.

log.Errorw("requesting headers from peer failed.", "failed peer", stat.peerID, "err", err)
select {
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

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

why? we will request headers from another peer. Previous one, will not be added

Copy link
Member Author

Choose a reason for hiding this comment

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

because then request won't be retried!

Copy link
Member Author

Choose a reason for hiding this comment

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

ctx.Done succeds and the case s.reqCh <- req does not do anything

Copy link
Member

Choose a reason for hiding this comment

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

yes, correctly. Sorry, I was blind on Friday

@Wondertan Wondertan marked this pull request as ready for review January 16, 2023 12:32
@Wondertan Wondertan marked this pull request as draft January 16, 2023 14:38
@Wondertan
Copy link
Member Author

Closing in favour of #1603

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.

2 participants