Skip to content

Commit

Permalink
A quick fix for libp2p#28 (libp2p#28) that makes sending out Provide …
Browse files Browse the repository at this point in the history
…messages in PubSub bootstrapping non-blocking
  • Loading branch information
aschmahmann committed May 2, 2019
1 parent 2c8ac20 commit acdaa3e
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 acdaa3e

Please sign in to comment.