diff --git a/flake.nix b/flake.nix index afc96639d..927cd21f6 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ ]; doCheck = false; # FIXME: This needs to be manually changed when updating modules. - vendorSha256 = "sha256-D0IwlMmCW32T/bfmJjFu3Mlg7pgW4j8IJGZUQ6fnHJQ="; + vendorSha256 = "sha256-pNkh5ZJEhC/X/SoqfWcm3w7W1EGOT3m2dzePM/XuA9w="; # Fix for 'nix run' trying to execute 'go-waku'. meta = { mainProgram = "waku"; }; }; diff --git a/waku/v2/protocol/relay/waku_relay.go b/waku/v2/protocol/relay/waku_relay.go index a6f9a1692..06fd2c281 100644 --- a/waku/v2/protocol/relay/waku_relay.go +++ b/waku/v2/protocol/relay/waku_relay.go @@ -286,8 +286,8 @@ func (w *WakuRelay) Publish(ctx context.Context, message *pb.WakuMessage, opts . return nil, errors.New("not enough peers to publish") } - w.topicsMutex.RLock() - defer w.topicsMutex.RUnlock() + w.topicsMutex.Lock() + defer w.topicsMutex.Unlock() pubSubTopic, err := w.upsertTopic(params.pubsubTopic) if err != nil {