This commit is contained in:
Marcel Pociot committed 2020-04-24 21:19:23 +02:00
1 parent a3eb79b77a
commit c89f6b38ea
2 files changed
+6 -4

No files matched your search

+5 -3
View File
@@ -49,13 +49,15 @@ class ConnectionManager implements ConnectionManagerContract
public function removeControlConnection($connection)
{
if (isset($this->httpConnections[$connection->request_id])) {
unset($this->httpConnections[$connection->request_id]);
if (isset($connection->request_id)) {
if (isset($this->httpConnections[$connection->request_id])) {
unset($this->httpConnections[$connection->request_id]);
}
}
if (isset($connection->client_id)) {
$clientId = $connection->client_id;
$this->collections = collect($this->connections)->reject(function ($connection) use ($clientId) {
$this->connections = collect($this->connections)->reject(function ($connection) use ($clientId) {
return $connection->client_id == $clientId;
})->toArray();
}