Skip to content

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Jacob Heun <[email protected]>
  • Loading branch information
vasco-santos and jacobheun authored Apr 27, 2020
1 parent fdf31c9 commit 1ac45cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1168,15 +1168,15 @@ unless they are performing a specific action. See [peer discovery and auto dial]

This event will be triggered anytime a new Connection is established to another peer.

`libp2p.on('peer:connect', (connection) => {})`
`libp2p.connectionManager.on('peer:connect', (connection) => {})`

- `connection`: instance of [`Connection`][connection]

#### An existing connection to a peer has been closed

This event will be triggered anytime we are disconnected from another peer, regardless of the circumstances of that disconnection. If we happen to have multiple connections to a peer, this event will **only** be triggered when the last connection is closed.

`libp2p.on('peer:disconnect', (connection) => {})`
`libp2p.connectionManager.on('peer:disconnect', (connection) => {})`

- `connection`: instance of [`Connection`][connection]

Expand Down

0 comments on commit 1ac45cc

Please sign in to comment.