Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Use 3hrs as routing advertisement ttl #23

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 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