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

Commit 9a6e8e3

Browse files
committed
Swapped order for mapWithKeys
1 parent 9f54699 commit 9a6e8e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ChannelManagers/RedisChannelManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public function removeObsoleteConnections(): bool
422422
$this->lock()->get(function () {
423423
$this->getConnectionsFromSet(0, now()->subMinutes(2)->format('U'))
424424
->then(function ($connections) {
425-
foreach ($connections as $appId => $socketId) {
425+
foreach ($connections as $socketId => $appId) {
426426
$this->unsubscribeFromAllChannels(
427427
$this->fakeConnectionForApp($appId, $socketId)
428428
);
@@ -606,7 +606,7 @@ public function getConnectionsFromSet(int $start = 0, int $stop = 0, bool $stric
606606
return collect($list)->mapWithKeys(function ($appWithSocket) {
607607
[$appId, $socketId] = explode(':', $appWithSocket);
608608

609-
return [$appId => $socketId];
609+
return [$socketId => $appId];
610610
})->toArray();
611611
});
612612
}

0 commit comments

Comments
 (0)