Commit 8a40bef7 authored by Thomas Preindl's avatar Thomas Preindl Committed by Steven Allen

fix deadline calculation in Provide function of routing.go (#377)

parent 36578e2b
......@@ -418,7 +418,7 @@ func (dht *IpfsDHT) Provide(ctx context.Context, key cid.Cid, brdcst bool) (err
return context.DeadlineExceeded
} else if timeout < 10*time.Second {
// Reserve 10% for the final put.
deadline = deadline.Add(timeout / 10)
deadline = deadline.Add(-timeout / 10)
} else {
// Otherwise, reserve a second (we'll already be
// connected so this should be fast).
......
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