Skip to content

Commit

Permalink
Merge pull request #23 from libp2p/fix/routing-advertisement-period
Browse files Browse the repository at this point in the history
Use 3hrs as routing advertisement ttl
  • Loading branch information
Stebalien committed Apr 16, 2019
2 parents f2dbbfc + ff747ff commit 2914cd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/discovery/generic/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...Opt
return 0, err
}

// the DHT provider record validity is 24hrs, but it is recommnded to republish every 6hrs
return 6 * time.Hour, nil
// the DHT provider record validity is 24hrs, but it is recommnded to republish at least every 6hrs
// we go one step further and republish every 3hrs
return 3 * time.Hour, nil
}

func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, opts ...Option) (<-chan pstore.PeerInfo, error) {
Expand Down

0 comments on commit 2914cd6

Please sign in to comment.