Skip to content

Commit

Permalink
Merge pull request #29 from aschmahmann/bug/28-slow-bootstrapping
Browse files Browse the repository at this point in the history
PutValue not blocked by Provide during bootstrapping
  • Loading branch information
Stebalien committed May 2, 2019
2 parents 2c8ac20 + acdaa3e commit 362e82d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ func bootstrapPubsub(ctx context.Context, cr routing.ContentRouting, host p2phos
hash := u.Hash([]byte(topic))
rz := cid.NewCidV1(cid.Raw, hash)

err := cr.Provide(ctx, rz, true)
if err != nil {
log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error())
}

go func() {
err := cr.Provide(ctx, rz, true)
if err != nil {
log.Warningf("bootstrapPubsub: error providing rendezvous for %s: %s", topic, err.Error())
}

for {
select {
case <-time.After(8 * time.Hour):
Expand Down

0 comments on commit 362e82d

Please sign in to comment.