perform connection callbacks

This commit is contained in:
Marcel Pociot
2021-12-21 15:37:04 +01:00
parent 12411c4fb5
commit d34f6d1300
2 changed files with 22 additions and 0 deletions

View File

@@ -74,9 +74,20 @@ class ConnectionManager implements ConnectionManagerContract
$this->logger->logSubdomain($storedConnection->authToken, $storedConnection->subdomain);
$this->performConnectionCallback($storedConnection);
return $storedConnection;
}
protected function performConnectionCallback(ControlConnection $connection)
{
$connectionCallback = config('expose.admin.connection_callback');
if ($connectionCallback !== null && class_exists($connectionCallback)) {
app($connectionCallback)->handle($connection);
}
}
public function storeTcpConnection(int $port, ConnectionInterface $connection): ControlConnection
{
$clientId = (string) uniqid();