From 374de747de2a0266b785c0017ef9b57e393ecad4 Mon Sep 17 00:00:00 2001 From: Florimond Husquinet Date: Mon, 18 Dec 2023 20:41:55 +0100 Subject: [PATCH] Quick fix: memory provider selection (#417) --- internal/broker/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/broker/service.go b/internal/broker/service.go index 53d7c46b..0367f52b 100644 --- a/internal/broker/service.go +++ b/internal/broker/service.go @@ -156,7 +156,11 @@ func NewService(ctx context.Context, cfg *config.Config) (s *Service, err error) s.surveyor = survey.New(s.pubsub, s.cluster) s.presence = presence.New(s, s.pubsub, s.surveyor, s.subscriptions) if s.cluster != nil { - s.surveyor.HandleFunc(s.presence, ssdstore, memstore) + if s.storage.Name() == ssdstore.Name() { + s.surveyor.HandleFunc(s.presence, ssdstore) + } else if s.storage.Name() == memstore.Name() { + s.surveyor.HandleFunc(s.presence, memstore) + } } // Create a new cipher from the licence provided