Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Framework\Http;
@@ -9,27 +10,31 @@ namespace App\Framework\Http;
final class WebSocketConnection
{
private bool $isConnected = true;
private array $attributes = [];
public function __construct(
private readonly string $id,
private $socket
) {}
) {
}
/**
* Sendet eine Text-Nachricht
*/
public function send(string $message): bool
{
if (!$this->isConnected) {
if (! $this->isConnected) {
return false;
}
try {
$frame = $this->createFrame($message, 0x1); // Text frame
return fwrite($this->socket, $frame) !== false;
} catch (\Throwable $e) {
$this->disconnect();
return false;
}
}
@@ -47,15 +52,17 @@ final class WebSocketConnection
*/
public function sendBinary(string $data): bool
{
if (!$this->isConnected) {
if (! $this->isConnected) {
return false;
}
try {
$frame = $this->createFrame($data, 0x2); // Binary frame
return fwrite($this->socket, $frame) !== false;
} catch (\Throwable $e) {
$this->disconnect();
return false;
}
}
@@ -65,15 +72,17 @@ final class WebSocketConnection
*/
public function ping(string $data = ''): bool
{
if (!$this->isConnected) {
if (! $this->isConnected) {
return false;
}
try {
$frame = $this->createFrame($data, 0x9); // Ping frame
return fwrite($this->socket, $frame) !== false;
} catch (\Throwable $e) {
$this->disconnect();
return false;
}
}
@@ -83,7 +92,7 @@ final class WebSocketConnection
*/
public function close(int $code = 1000, string $reason = ''): void
{
if (!$this->isConnected) {
if (! $this->isConnected) {
return;
}