Commit b016e377 authored by Jeromy's avatar Jeromy Committed by Juan Batiz-Benet

fixes to make interface more usable

parent f68587d2
......@@ -101,6 +101,7 @@ func (dht *IpfsDHT) Provide(ctx context.Context, key u.Key) error {
dht.providers.AddProvider(key, dht.self)
peers := dht.routingTables[0].NearestPeers(kb.ConvertKey(key), PoolSize)
if len(peers) == 0 {
// Early out for no targets
return nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment