commit
This commit is contained in:
parent
525d0357b9
commit
059c521270
|
|
@ -51,8 +51,14 @@ class ChannelManager
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the connection from all channels.
|
||||||
|
*/
|
||||||
collect($this->channels[$connection->client->appId])->each->unsubscribe($connection);
|
collect($this->channels[$connection->client->appId])->each->unsubscribe($connection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unset all channels that have no connections so we don't leak memory.
|
||||||
|
*/
|
||||||
collect($this->channels[$connection->client->appId])
|
collect($this->channels[$connection->client->appId])
|
||||||
->reject->hasConnections()
|
->reject->hasConnections()
|
||||||
->each(function (Channel $channel, string $channelId) use ($connection) {
|
->each(function (Channel $channel, string $channelId) use ($connection) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue