update use of discovery.FindPeers for new interface

This commit is contained in:
vyzo 2019-05-17 22:05:57 +03:00
parent fc6f373465
commit 0a221500fd
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ func (ar *AutoRelay) connect(ctx context.Context, pi pstore.PeerInfo) bool {
func (ar *AutoRelay) discoverRelays(ctx context.Context) ([]pstore.PeerInfo, error) {
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
return discovery.FindPeers(ctx, ar.discover, RelayRendezvous, 1000)
return discovery.FindPeers(ctx, ar.discover, RelayRendezvous, discovery.Limit(1000))
}
func (ar *AutoRelay) selectRelays(ctx context.Context, pis []pstore.PeerInfo) []pstore.PeerInfo {