Skip to content

Commit

Permalink
fix pubsub topic subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Oct 7, 2024
1 parent e86699e commit 5d16912
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ func (s *server) publishLog(ctx context.Context, topic string, req *pushLogReque
t, ok := s.topics[topic]
s.mu.Unlock()
if !ok {
subscribe := true
if topic != req.SchemaRoot && s.hasPubSubTopic(req.SchemaRoot) {
subscribe = false
subscribe := false
if topic != req.SchemaRoot && !s.hasPubSubTopic(req.SchemaRoot) {
subscribe = true
}
err := s.addPubSubTopic(topic, subscribe, nil)
if err != nil {
Expand Down

0 comments on commit 5d16912

Please sign in to comment.