Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 3e4de44

Browse files
committed
require socket.io routes only when websocket is enabled
1 parent 0159eba commit 3e4de44

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/HttpServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ public function boot()
5252
__DIR__ . '/../config/swoole_websocket.php' => base_path('config/swoole_websocket.php'),
5353
__DIR__ . '/../routes/websocket.php' => base_path('routes/websocket.php')
5454
], 'laravel-swoole');
55-
$this->bootRoutes();
55+
56+
if ($this->app['config']->get('swoole_http.websocket.enabled')) {
57+
$this->bootRoutes();
58+
}
5659
}
5760

5861
/**

0 commit comments

Comments
 (0)