Merge branch 'master' of github.com:beyondcode/laravel-websockets
This commit is contained in:
commit
2a33b5ec1f
|
|
@ -56,7 +56,7 @@ class WebsocketLogger extends Logger implements MessageComponentInterface
|
|||
|
||||
$appId = $connection->client->appId ?? 'Unknown app id';
|
||||
|
||||
$message = "{$appId}: exception `{$exceptionClass}` thrown: `{$exception->getMessage()}`";
|
||||
$message = "{$appId}: exception `{$exceptionClass}` thrown: `{$exception->getMessage()}`.";
|
||||
|
||||
if ($this->verbose) {
|
||||
$message .= $exception->getTraceAsString();
|
||||
|
|
|
|||
|
|
@ -51,8 +51,14 @@ class ChannelManager
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the connection from all channels.
|
||||
*/
|
||||
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])
|
||||
->reject->hasConnections()
|
||||
->each(function (Channel $channel, string $channelId) use ($connection) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue