Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
slavarazum authored and github-actions[bot] committed Apr 27, 2023
1 parent d06b97b commit 66d16d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Listeners/RemoveStoredConnectionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct(private PresenceChannelUsersRepository $store)

public function handle(SseConnectionClosedEvent $event)
{
if ($event->user === null) {
if (!$event->user instanceof \Illuminate\Contracts\Auth\Authenticatable) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/RedisSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function start(Closure $onMessage, Request $request)
$connection = Redis::connection("$redisConnectionName-subscription");

register_shutdown_function(function () use ($request, $connection) {
if (connection_aborted()) {
if (connection_aborted() !== 0) {
event(new SseConnectionClosedEvent($request->user(), $request->header('X-Socket-Id')));
}

Expand Down

0 comments on commit 66d16d2

Please sign in to comment.