This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 16
16
use BeyondCode \LaravelWebSockets \Server \WebSocketServerFactory ;
17
17
18
18
use React \EventLoop \Factory as LoopFactory ;
19
+ use React \Socket \Connector ;
19
20
20
21
class StartWebSocketServer extends Command
21
22
{
@@ -46,9 +47,9 @@ public function handle()
46
47
47
48
protected function configureStatisticsLogger ()
48
49
{
49
- $ connector = new \ React \ Socket \ Connector ($ this ->loop , array (
50
+ $ connector = new Connector ($ this ->loop , [
50
51
'dns ' => '127.0.0.1 '
51
- ) );
52
+ ] );
52
53
53
54
$ browser = new Browser ($ this ->loop , $ connector );
54
55
@@ -57,8 +58,7 @@ protected function configureStatisticsLogger()
57
58
return new HttpStatisticsLogger (app (ChannelManager::class), $ browser );
58
59
});
59
60
60
- $ this ->loop ->addPeriodicTimer (5 , function () {
61
- echo 'saving stats... ' ;
61
+ $ this ->loop ->addPeriodicTimer (60 , function () {
62
62
StatisticsLogger::save ();
63
63
});
64
64
Original file line number Diff line number Diff line change @@ -65,8 +65,6 @@ protected function initializeStatistics($id)
65
65
66
66
public function save ()
67
67
{
68
- echo 'in actual save method ' ;
69
-
70
68
foreach ($ this ->statistics as $ appId => $ statistic ) {
71
69
72
70
if (!$ statistic ->isEnabled ()) {
You can’t perform that action at this time.
0 commit comments