mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -65,13 +65,13 @@ class Client
|
||||
});
|
||||
|
||||
$connection->on('authenticationFailed', function ($data) use ($deferred) {
|
||||
$this->logger->error($data->data->message);
|
||||
$this->logger->error($data->message);
|
||||
|
||||
$this->exit($deferred);
|
||||
});
|
||||
|
||||
$connection->on('subdomainTaken', function ($data) use ($deferred) {
|
||||
$this->logger->error($data->data->message);
|
||||
$this->logger->error($data->message);
|
||||
|
||||
$this->exit($deferred);
|
||||
});
|
||||
@@ -94,6 +94,7 @@ class Client
|
||||
$host .= ":{$this->configuration->port()}";
|
||||
}
|
||||
|
||||
$this->logger->info($data->message);
|
||||
$this->logger->info("Connected to {$httpProtocol}://{$data->subdomain}.{$host}");
|
||||
|
||||
static::$subdomains[] = "$data->subdomain.{$this->configuration->host()}:{$this->configuration->port()}";
|
||||
|
||||
@@ -34,10 +34,10 @@ class ControlConnection
|
||||
$this->socket->on('message', function (Message $message) {
|
||||
$decodedEntry = json_decode($message);
|
||||
|
||||
$this->emit($decodedEntry->event ?? '', [$decodedEntry]);
|
||||
$this->emit($decodedEntry->event ?? '', [$decodedEntry->data]);
|
||||
|
||||
if (method_exists($this, $decodedEntry->event ?? '')) {
|
||||
call_user_func([$this, $decodedEntry->event], $decodedEntry);
|
||||
call_user_func([$this, $decodedEntry->event], $decodedEntry->data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user