From 5d1691285d9739e99e2d5ffcac41968dbf8222d7 Mon Sep 17 00:00:00 2001 From: Fred Carle Date: Sun, 6 Oct 2024 23:53:05 -0400 Subject: [PATCH] fix pubsub topic subscription --- net/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/server.go b/net/server.go index 74cc16f22f..b69aa12868 100644 --- a/net/server.go +++ b/net/server.go @@ -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 {