fix unsubscribeFromAllChannels / stale connections
the `each->` call silently ran only for the first channel leading to users on other channels seeming randomly not getting unsubscribed, stale connections, a frustrated dev and a fishy smell all over the place. after some serious hours of debugging and searching for this sneaky bug the websocket-world is now a better place ;)
This commit is contained in:
parent
efb3aa82b9
commit
6b6197f4f1
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue