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

swarm/behaviour: Document inject_connected called for first only #1954

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Feb 14, 2021

NetworkBehaviour::inject_connected is called for the first established
connection to a peer only. See swarm/src/lib.rs:

this.behaviour.inject_connection_established(&peer_id, &connection.id(), &endpoint);
if num_established.get() == 1 {
    this.behaviour.inject_connected(&peer_id);
}

This commit adjusts the documentation accordingly.

`NetworkBehaviour::inject_connected` is called for the first established
connection to a peer only. See `swarm/src/lib.rs`:

```rust
this.behaviour.inject_connection_established(&peer_id, &connection.id(), &endpoint);
if num_established.get() == 1 {
    this.behaviour.inject_connected(&peer_id);
}
```

This commit adjusts the documentation accordingly.
Copy link
Contributor

@romanb romanb left a comment

Choose a reason for hiding this comment

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

Build errors seem to be due to an inappropriate snow patch release after upgrading rand whose traits are in the public API of snow.

@mxinden
Copy link
Member Author

mxinden commented Feb 14, 2021

Build errors seem to be due to an inappropriate snow patch release after upgrading rand whose traits are in the public API of snow.

👍 asked the author to yank the release and cut a minor release instead: mcginty/snow#107 (comment)

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