This repository was archived by the owner on Oct 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -656,7 +656,8 @@ impl<Types: IpfsTypes> Ipfs<Types> {
656
656
/// Accepts only multiaddresses with the PeerId to authenticate the connection.
657
657
///
658
658
/// Returns a future which will complete when the connection has been successfully made or
659
- /// failed for whatever reason.
659
+ /// failed for whatever reason. It is possible for this method to return an error, while ending
660
+ /// up being connected to the peer by the means of another connection.
660
661
pub async fn connect ( & self , target : MultiaddrWithPeerId ) -> Result < ( ) , Error > {
661
662
async move {
662
663
let ( tx, rx) = oneshot_channel ( ) ;
@@ -716,6 +717,8 @@ impl<Types: IpfsTypes> Ipfs<Types> {
716
717
///
717
718
/// At the moment the peer is disconnected by temporarily banning the peer and unbanning it
718
719
/// right after. This should always disconnect all connections to the peer.
720
+ ///
721
+ /// Note: this is rarely needed in pratice as connections will time out if left unused.
719
722
pub async fn disconnect ( & self , target : MultiaddrWithPeerId ) -> Result < ( ) , Error > {
720
723
async move {
721
724
let ( tx, rx) = oneshot_channel ( ) ;
You can’t perform that action at this time.
0 commit comments