Skip to content

Commit

Permalink
- fix default disconnect response
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostravan committed Jul 24, 2024
1 parent d51c682 commit 6ed8034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Worker/CentrifugoWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use RoadRunner\Centrifugal\API\DTO\V1\DisconnectResponse;
use RoadRunner\Centrifugo\CentrifugoWorker as RoadRunnerCentrifugoWorker;
use RoadRunner\Centrifugo\Payload\ConnectResponse;
use RoadRunner\Centrifugo\Payload\Disconnect;
use RoadRunner\Centrifugo\Payload\PublishResponse;
use RoadRunner\Centrifugo\Payload\RefreshResponse;
use RoadRunner\Centrifugo\Payload\RPCResponse;
Expand Down Expand Up @@ -71,7 +72,7 @@ public function start(): void
$event instanceof SubRefreshEvent => new SubRefreshResponse(),
$event instanceof SubscribeEvent => new SubscribeResponse(),
$event instanceof RPCEvent => new RPCResponse(),
default => new DisconnectResponse(),
default => new Disconnect(1000, "No response"),
};

$request->respond($response);
Expand Down

0 comments on commit 6ed8034

Please sign in to comment.