diff --git a/src/Traits/Cluster/MakesWebsocketCalls.php b/src/Traits/Cluster/MakesWebsocketCalls.php index 06d85c3c..bed39889 100644 --- a/src/Traits/Cluster/MakesWebsocketCalls.php +++ b/src/Traits/Cluster/MakesWebsocketCalls.php @@ -6,7 +6,7 @@ use Exception; use Illuminate\Support\Str; use Ratchet\Client\Connector as WebSocketConnector; -use React\EventLoop\Factory as ReactFactory; +use React\EventLoop\Loop as ReactLoop; use React\Socket\Connector as ReactSocketConnector; trait MakesWebsocketCalls @@ -65,7 +65,7 @@ public function getWsClient(string $url): array $options['tls']['local_pk'] = $this->sslKey; } - $loop = ReactFactory::create(); + $loop = ReactLoop::get(); $socketConnector = new ReactSocketConnector($loop, $options); $wsConnector = new WebSocketConnector($loop, $socketConnector);