Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Aug 22, 2023
1 parent d988eb7 commit e718798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions p2p/protocol/autonatv2/autonat.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ func (an *AutoNAT) Close() {
an.wg.Wait()
}

// CheckReachability makes a single dial request for checking reachability. For highPriorityAddrs dial charge is paid
// if the server asks for it. For lowPriorityAddrs dial charge is rejected.
// CheckReachability makes a single dial request for checking reachability for requested addresses
func (an *AutoNAT) CheckReachability(ctx context.Context, reqs []Request) (Result, error) {
if !an.allowAllAddrs {
for _, r := range reqs {
Expand Down
3 changes: 1 addition & 2 deletions p2p/protocol/autonatv2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func (ac *client) RegisterDialBack() {
ac.host.SetStreamHandler(DialBackProtocol, ac.handleDialBack)
}

// CheckReachability verifies address reachability with a AutoNAT v2 server p. It'll provide dial data for dialing high
// priority addresses and not for low priority addresses.
// CheckReachability verifies address reachability with a AutoNAT v2 server p.
func (ac *client) CheckReachability(ctx context.Context, p peer.ID, reqs []Request) (Result, error) {
ctx, cancel := context.WithTimeout(ctx, streamTimeout)
defer cancel()
Expand Down

0 comments on commit e718798

Please sign in to comment.