Swapped order for mapWithKeys

This commit is contained in:
Alex Renoki 2020-09-18 12:31:51 +03:00
parent 9f54699da4
commit 9a6e8e3dc1
1 changed files with 2 additions and 2 deletions

View File

@ -422,7 +422,7 @@ class RedisChannelManager extends LocalChannelManager
$this->lock()->get(function () {
$this->getConnectionsFromSet(0, now()->subMinutes(2)->format('U'))
->then(function ($connections) {
foreach ($connections as $appId => $socketId) {
foreach ($connections as $socketId => $appId) {
$this->unsubscribeFromAllChannels(
$this->fakeConnectionForApp($appId, $socketId)
);
@ -606,7 +606,7 @@ class RedisChannelManager extends LocalChannelManager
return collect($list)->mapWithKeys(function ($appWithSocket) {
[$appId, $socketId] = explode(':', $appWithSocket);
return [$appId => $socketId];
return [$socketId => $appId];
})->toArray();
});
}