Skip to content

Commit

Permalink
pass new context to getDocHeads
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Jun 27, 2024
1 parent fb13a22 commit 9433d54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/db/p2p_replicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (db *db) SetReplicator(ctx context.Context, rep client.Replicator) error {
db.events.Publish(event.NewMessage(event.ReplicatorName, event.Replicator{
Info: rep.Info,
Schemas: storedSchemas,
Docs: db.getDocsHeads(ctx, addedCols),
Docs: db.getDocsHeads(context.Background(), addedCols),
}))
})

Expand Down
4 changes: 2 additions & 2 deletions net/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ func NewPeer(
cancel: cancel,
}

p.bus.Publish(event.NewMessage(event.PeerInfoName, event.PeerInfo{Info: p.PeerInfo()}))

p.server, err = newServer(p, options.GRPCDialOptions...)
if err != nil {
return nil, err
Expand Down Expand Up @@ -282,6 +280,8 @@ func (p *Peer) Start() error {
}
}()

p.bus.Publish(event.NewMessage(event.PeerInfoName, event.PeerInfo{Info: p.PeerInfo()}))

return nil
}

Expand Down

0 comments on commit 9433d54

Please sign in to comment.