File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1717use Hyperf \Engine \Contract \WebSocket \FrameInterface ;
1818use Hyperf \Engine \WebSocket \Response as WsResponse ;
1919use Hyperf \Server \CoroutineServer ;
20+ use Hyperf \Server \SwowServer ;
2021use Hyperf \WebSocketServer \Exception \InvalidMethodException ;
2122use Psr \Container \ContainerInterface ;
2223use Psr \Log \LoggerInterface ;
@@ -47,7 +48,10 @@ public function __construct(protected ContainerInterface $container)
4748 {
4849 $ this ->logger = $ container ->get (StdoutLoggerInterface::class);
4950 if ($ config = $ container ->get (ConfigInterface::class)) {
50- $ this ->isCoroutineServer = $ config ->get ('server.type ' ) === CoroutineServer::class;
51+ $ this ->isCoroutineServer = in_array ($ config ->get ('server.type ' ), [
52+ CoroutineServer::class,
53+ SwowServer::class,
54+ ]);
5155 }
5256 }
5357
You can’t perform that action at this time.
0 commit comments