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

cleanup the ping command #5680

Merged
merged 3 commits into from
Oct 30, 2018
Merged

cleanup the ping command #5680

merged 3 commits into from
Oct 30, 2018

Conversation

Stebalien
Copy link
Member

followup to the ping -> cmds 2.0 change

  1. Use emit directly.
  2. Abort immediately when the context is canceled (no need to wait a second for the sleep to elapse).
  3. Ping once a second instead of once a second +TTL (to be more like ping)
  4. Simplify ParsePeerParam

@ghost ghost assigned Stebalien Oct 27, 2018
@ghost ghost added the status/in-progress In progress label Oct 27, 2018
1. Use emit directly.
2. Abort immediately when the context is canceled (no need to wait a second for
the sleep to elapse).
3. Ping once a second instead of once a second +TTL (to be more like ping)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
We now *have* p2p multiaddrs.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
if err != nil {
select {
case outChan <- &PingResult{Text: fmt.Sprintf("Peer lookup error: %s", err)}:
case <-ctx.Done():
Copy link
Member Author

Choose a reason for hiding this comment

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

This should have used the command context, not the find-peer context. This context is pretty much guaranteed to be expired at this point (so will return "success" to the user when we fail to lookup the peer). This is causing the JS interop tests to fail (for good reason).

…in ping

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Stebalien Stebalien merged commit f8375ec into master Oct 30, 2018
@Stebalien Stebalien deleted the fix/cleanup-ping branch October 30, 2018 13:42
@ghost ghost removed the status/in-progress In progress label Oct 30, 2018
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