From 098bbdf7e1bae0af8b29e96d2ef71ecae5b543a4 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Wed, 15 Nov 2023 16:57:12 +0000 Subject: [PATCH] use singleton --- src/ServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index d7423320..1b30580c 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -47,14 +47,14 @@ public function registerServer() $server->register(); - $this->app->bind( + $this->app->singleton( ConnectionManager::class, - fn () => $server->buildConnectionManager() + $server->buildConnectionManager() ); - $this->app->bind( + $this->app->singleton( ChannelManager::class, - fn () => $server->buildChannelManager() + $server->buildChannelManager() ); $this->app->instance(Logger::class, new NullLogger);