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

openStream: avoid time.Sleep in exponential backoff #429

Closed
wants to merge 2 commits into from

Conversation

jsign
Copy link
Contributor

@jsign jsign commented Oct 9, 2020

The backoff logic was doing time.Sleep(...) which isn't nice for handling cancelation.

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
@jsign jsign changed the title StorageAsk: avoid time.Sleep in exponential backoff openStream: avoid time.Sleep in exponential backoff Oct 9, 2020
@jsign jsign marked this pull request as ready for review October 9, 2020 22:46
@codecov-io
Copy link

codecov-io commented Oct 9, 2020

Codecov Report

Merging #429 into master will decrease coverage by 0.14%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #429      +/-   ##
==========================================
- Coverage   66.33%   66.19%   -0.13%     
==========================================
  Files          48       48              
  Lines        3189     3197       +8     
==========================================
+ Hits         2115     2116       +1     
- Misses        830      837       +7     
  Partials      244      244              
Impacted Files Coverage Δ
retrievalmarket/network/libp2p_impl.go 80.65% <0.00%> (-5.56%) ⬇️
storagemarket/network/libp2p_impl.go 85.72% <50.00%> (-2.24%) ⬇️

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 ce9fcaf...9498549. Read the comment docs.

retrievalmarket/network/libp2p_impl.go Outdated Show resolved Hide resolved
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
@jsign jsign requested a review from Stebalien October 9, 2020 23:07
@Stebalien
Copy link
Member

I mostly just pedantically avoid time.After except when testing, so I don't have to think about this when reading code.

@hannahhoward
Copy link
Collaborator

Merged in #431

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.

4 participants