Skip to content

Commit

Permalink
fix nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Nov 14, 2023
1 parent b336a66 commit 082cdf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ var (
)

func (c *Controller) setupPubsubRouter(ctx context.Context, cfg commons.Config) error {
msgID := gossip.MsgIDFn(gossip.MsgIDFuncType(cfg.Pubsub.MsgIDFnConfig.Type), gossip.MsgIDSize(cfg.Pubsub.MsgIDFnConfig.Size))
msgID := gossip.DefaultMsgIDFn
if cfg.Pubsub.MsgIDFnConfig != nil {
msgID = gossip.MsgIDFn(gossip.MsgIDFuncType(cfg.Pubsub.MsgIDFnConfig.Type), gossip.MsgIDSize(cfg.Pubsub.MsgIDFnConfig.Size))
}
opts := []pubsub.Option{
pubsub.WithMessageSigning(false),
pubsub.WithMessageSignaturePolicy(pubsub.StrictNoSign),
Expand Down

0 comments on commit 082cdf6

Please sign in to comment.