From a8baaaae403a556b6d5d76bc2f7eb46cca7bfb15 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 8 Jun 2021 18:41:54 +0300 Subject: - Move ws memory pub-sub plugin into the websockets folder - Update CHANGELOG Signed-off-by: Valery Piashchynski --- plugins/websockets/plugin.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/websockets/plugin.go') diff --git a/plugins/websockets/plugin.go b/plugins/websockets/plugin.go index 39a4e139..cf21fffa 100644 --- a/plugins/websockets/plugin.go +++ b/plugins/websockets/plugin.go @@ -23,6 +23,7 @@ import ( "github.com/spiral/roadrunner/v2/plugins/server" "github.com/spiral/roadrunner/v2/plugins/websockets/connection" "github.com/spiral/roadrunner/v2/plugins/websockets/executor" + "github.com/spiral/roadrunner/v2/plugins/websockets/memory" "github.com/spiral/roadrunner/v2/plugins/websockets/pool" "github.com/spiral/roadrunner/v2/plugins/websockets/validator" "google.golang.org/protobuf/proto" @@ -90,6 +91,11 @@ func (p *Plugin) Serve() chan error { p.Lock() defer p.Unlock() + // attach default driver + if len(p.pubsubs) == 0 { + p.pubsubs["memory"] = memory.NewInMemory(p.log) + } + p.phpPool, err = p.server.NewWorkerPool(context.Background(), phpPool.Config{ Debug: p.cfg.Pool.Debug, NumWorkers: p.cfg.Pool.NumWorkers, -- cgit v1.2.3