mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -31,6 +31,9 @@ class Client
|
||||
/** @var int */
|
||||
protected $timeConnected = 0;
|
||||
|
||||
/** @var bool */
|
||||
protected $shouldExit = true;
|
||||
|
||||
public static $user = [];
|
||||
public static $subdomains = [];
|
||||
|
||||
@@ -41,6 +44,11 @@ class Client
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function shouldExit($shouldExit = true)
|
||||
{
|
||||
$this->shouldExit = $shouldExit;
|
||||
}
|
||||
|
||||
public function share(string $sharedUrl, array $subdomains = [], $serverHost = null)
|
||||
{
|
||||
$sharedUrl = $this->prepareSharedUrl($sharedUrl);
|
||||
@@ -237,7 +245,9 @@ class Client
|
||||
$deferred->reject();
|
||||
|
||||
$this->loop->futureTick(function () {
|
||||
exit(1);
|
||||
if ($this->shouldExit) {
|
||||
exit(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user