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 17
17
use Hyperf \Engine \Contract \WebSocket \FrameInterface ;
18
18
use Hyperf \Engine \WebSocket \Response as WsResponse ;
19
19
use Hyperf \Server \CoroutineServer ;
20
+ use Hyperf \Server \SwowServer ;
20
21
use Hyperf \WebSocketServer \Exception \InvalidMethodException ;
21
22
use Psr \Container \ContainerInterface ;
22
23
use Psr \Log \LoggerInterface ;
@@ -47,7 +48,10 @@ public function __construct(protected ContainerInterface $container)
47
48
{
48
49
$ this ->logger = $ container ->get (StdoutLoggerInterface::class);
49
50
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
+ ]);
51
55
}
52
56
}
53
57
You can’t perform that action at this time.
0 commit comments