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

Commit 286629f

Browse files
committed
wip
1 parent 2eaae22 commit 286629f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Server/Logger/ConnectionLogger.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ protected function getConnection()
3030

3131
public function send($data)
3232
{
33-
$this->info("Connection id {$this->connection->socketId} sending message {$data}");
33+
$socketId = $this->connection->socketId ?? null;
34+
35+
$this->info("Connection id {$socketId} sending message {$data}");
3436

3537
$this->connection->send($data);
3638
}

src/Server/Logger/WebsocketsLogger.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public function onMessage(ConnectionInterface $connection, MessageInterface $mes
4545

4646
public function onClose(ConnectionInterface $connection)
4747
{
48-
$this->warn("Connection id {$connection->socketId} closed.");
48+
$socketId = $connection->socketId ?? null;
49+
50+
$this->warn("Connection id {$socketId} closed.");
4951

5052
$this->app->onClose(ConnectionLogger::decorate($connection));
5153
}

0 commit comments

Comments
 (0)