Merge pull request #708 from simonbuehler/master

[2.x] Fix unsubscribeFromAllChannels leaving stale connections
This commit is contained in:
rennokki 2021-03-30 18:08:52 +03:00 committed by GitHub
commit 3cf74c7a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -173,7 +173,10 @@ class LocalChannelManager implements ChannelManager
$this->getLocalChannels($connection->app->id)
->then(function ($channels) use ($connection) {
collect($channels)->each->unsubscribe($connection);
collect($channels)
->each(function (Channel $channel) use ($connection) {
$channel->unsubscribe($connection);
});
collect($channels)
->reject->hasConnections()