Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 56bee17

Browse files
committed
wip
1 parent 8bd50f0 commit 56bee17

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Console/StartWebSocketServer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use BeyondCode\LaravelWebSockets\Server\WebSocketServerFactory;
1717

1818
use React\EventLoop\Factory as LoopFactory;
19+
use React\Socket\Connector;
1920

2021
class StartWebSocketServer extends Command
2122
{
@@ -46,9 +47,9 @@ public function handle()
4647

4748
protected function configureStatisticsLogger()
4849
{
49-
$connector = new \React\Socket\Connector($this->loop, array(
50+
$connector = new Connector($this->loop, [
5051
'dns' => '127.0.0.1'
51-
));
52+
]);
5253

5354
$browser = new Browser($this->loop, $connector);
5455

@@ -57,8 +58,7 @@ protected function configureStatisticsLogger()
5758
return new HttpStatisticsLogger(app(ChannelManager::class), $browser);
5859
});
5960

60-
$this->loop->addPeriodicTimer(5, function() {
61-
echo 'saving stats...';
61+
$this->loop->addPeriodicTimer(60, function() {
6262
StatisticsLogger::save();
6363
});
6464

src/Statistics/Logger/HttpStatisticsLogger.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ protected function initializeStatistics($id)
6565

6666
public function save()
6767
{
68-
echo 'in actual save method';
69-
7068
foreach ($this->statistics as $appId => $statistic) {
7169

7270
if (!$statistic->isEnabled()) {

0 commit comments

Comments
 (0)