Skip to content

Commit

Permalink
* Push: fix access to undeclared static propertiy SwoolPush\Backend::…
Browse files Browse the repository at this point in the history
…$failed_attempts
  • Loading branch information
ralfbecker committed Oct 6, 2020
1 parent 2e0ef0b commit e23af88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Backend.php
Expand Up @@ -38,12 +38,12 @@ class Backend extends Credentials implements Api\Json\PushBackend
function __construct()
{
$this->url = Api\Framework::getUrl(Api\Framework::link('/push'));
// stopping endless Travis logs because of http:///egroupware/ url not reachable
if (substr($this->url, 0, 8) === 'http:///') self::$failed_attempts = true;

if (($n=self::failedAttempts()) > self::MAX_FAILED_ATTEMPTS)
// stopping cli with default URL "/egroupware" and endless Travis logs because of http:///egroupware/ url not reachable
if (substr($this->url, 0, 8) === 'http:///' ||
($n=self::failedAttempts()) > self::MAX_FAILED_ATTEMPTS)
{
throw new Api\Exception\NotFound("Stopped trying to connect to push server $this->url after $n failed attempts!");
throw new Api\Exception\NotFound("Stopped trying to connect to push server $this->url".
(isset($n) ? "after $n failed attempts!" : "!"));
}
}

Expand Down

0 comments on commit e23af88

Please sign in to comment.