Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Return time since connection if no round trip yet #479

Merged
merged 3 commits into from
Apr 6, 2022
Merged

Return time since connection if no round trip yet #479

merged 3 commits into from
Apr 6, 2022

Conversation

jmmaloney4
Copy link
Contributor

@jmmaloney4 jmmaloney4 commented Dec 2, 2021

Fixes #178.

@koivunej
Copy link
Collaborator

koivunej commented Dec 2, 2021

I gave this a quick look and it seems great, thanks for doing this! I was thinking that maybe the one of the existing hashmaps could perhaps be used for this but ... That would then complicate other things. The connection tracking parts are a bit overdue for proper cleanup and moving upwards to rust-libp2p.

There's now some npm related breakage but the build failing at that step means that the (few) rust tests passed. Oki, it's most likely because I have forgotten an old url there. I'll probably handle this on a separate PR.

Could you take care of the rustfmt issue? Just do a cargo fmt and commit.

There's another issue after you fix the rustfmt issue with protoc missing, will be handling that in #480 the same.

@jmmaloney4 jmmaloney4 closed this Dec 6, 2021
@jmmaloney4 jmmaloney4 deleted the fix-178 branch December 6, 2021 04:06
@jmmaloney4 jmmaloney4 restored the fix-178 branch December 6, 2021 04:06
@jmmaloney4 jmmaloney4 reopened this Dec 6, 2021
@jmmaloney4
Copy link
Contributor Author

Oops

@mxinden
Copy link

mxinden commented Dec 6, 2021

The connection tracking parts are a bit overdue for proper cleanup and moving upwards to rust-libp2p.

Happy to discuss tracking the time of a connection in rust-libp2p. Feel free to open an issue on https://github.com/libp2p/rust-libp2p/.

bors bot added a commit that referenced this pull request Jan 31, 2022
480: build: fix wrong repo urls, clippies r=koivunej a=koivunej

I had forgotten some old urls there which are sure to cause build failures, as seen in the #479.


Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

Thanks for this @jmmaloney4. I have to admit I forgot about this PR while hustling the #480, apologies for that.

I've rebased this on top of the latest master. The second commit was not needed anymore so it was dropped, and I simplified with the use of Instant::elapsed. I also edited the PR description to remove the checklist which does not really apply here, and it will be copied by bors to the merge commit.

It looks like conformance tests agree, so I'll push a changelog entry and merge this. Thanks again.

@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

bors r+

bors bot added a commit that referenced this pull request Apr 6, 2022
479: Return time since connection if no round trip yet r=koivunej a=jmmaloney4

Fixes #178.


Co-authored-by: Jack Maloney <[email protected]>
Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

@mxinden

Happy to discuss tracking the time of a connection in rust-libp2p. Feel free to open an issue on https://github.com/libp2p/rust-libp2p/.

I will try to remember this and apologies on the late reply once more for you as well. I think the big cleanup is overdue with me really understanding the Merge inject_* paired methods PR working through these easier changes. Mostly the problems are within the rust-ipfs, trying to write code to support different interleavings of polls vs. injections while providing a futures api.

@bors
Copy link
Contributor

bors bot commented Apr 6, 2022

Build failed:

@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

bors retry

bors bot added a commit that referenced this pull request Apr 6, 2022
479: Return time since connection if no round trip yet r=koivunej a=jmmaloney4

Fixes #178.


Co-authored-by: Jack Maloney <[email protected]>
Co-authored-by: Joonas Koivunen <[email protected]>
@bors
Copy link
Contributor

bors bot commented Apr 6, 2022

Build failed:

@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

Well, this is ackward.

bors retry

bors bot added a commit that referenced this pull request Apr 6, 2022
479: Return time since connection if no round trip yet r=koivunej a=jmmaloney4

Fixes #178.


Co-authored-by: Jack Maloney <[email protected]>
Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

Well, it would appear that gha is having some issues now with the bad credentials issue. I'll try again later.

@bors
Copy link
Contributor

bors bot commented Apr 6, 2022

Build failed:

@koivunej
Copy link
Collaborator

koivunej commented Apr 6, 2022

bors retry

@bors
Copy link
Contributor

bors bot commented Apr 6, 2022

Build succeeded:

@bors bors bot merged commit 275b761 into rs-ipfs:master Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No latency in verbose swarm/peers before a ping response
3 participants