Skip to content

Commit

Permalink
Explicitl relay messages for the topics we are interested in
Browse files Browse the repository at this point in the history
  • Loading branch information
bahner committed Mar 16, 2024
1 parent 95c667f commit f48a144
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions entity/actor/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func (a *Actor) Subscribe(ctx context.Context, e *entity.Entity) {
log.Errorf("Failed to subscribe to topic: %v", err)
return
}
cancelRelay, err := e.Topic.Relay()
if err != nil {
log.Errorf("actorSubscribe: failed to relay to topic: %v", err)
}
defer cancelRelay()

// Create a channel for messages.
messages := make(chan *p2ppubsub.Message, PUBSUB_MESSAGES_BUFFERSIZE)
Expand Down

0 comments on commit f48a144

Please sign in to comment.