-
Notifications
You must be signed in to change notification settings - Fork 226
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: set context timeout for queryPeer
#996
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks @MarcoPolo! Let's wait for @ligustah 's confirmation
queryPeer
queryPeer
testing timeouts from libp2p/go-libp2p-kad-dht#994 and libp2p/go-libp2p-kad-dht#996
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this on kubo-staging-us-east-02
(internal notes) and locally in someguy and no concerns so far.
I'm going to merge this and tag a release to include it in Kubo 0.32.
This aims to correctly apply intention of fix from #996 It did not work correctly because `context.WithTimeout` was created once per goroutine but was used for multiple queries within the `for p := range jobs` loop. This meant once the timeout expires for the first query, all subsequent queries in that worker would immediately fail since they're using the same expired context.
Accompanies #994
@ligustah could you confirm if this fixes your issue?