Commit 620d10bc authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #413 in ZP/z-push from...

Merge pull request #413 in ZP/z-push from bugfix/ZP-1090-use-ping-higher-bound-when-available to develop

* commit 'fc0154c2':
  ZP-1090 Use PING_HIGHER_BOUND_LIFETIME when available for the default ping lifetime. Released under the Affero GNU General Public License (AGPL) version 3.
parents 13bd3352 fc0154c2
...@@ -441,11 +441,16 @@ class SyncCollections implements Iterator { ...@@ -441,11 +441,16 @@ class SyncCollections implements Iterator {
* previousily set or saved in a collection * previousily set or saved in a collection
* *
* @access public * @access public
* @return int returns 600 as default if nothing set or not available * @return int returns PING_HIGHER_BOUND_LIFETIME as default if nothing set or not available.
* If PING_HIGHER_BOUND_LIFETIME is not set, returns 600.
*/ */
public function GetLifetime() { public function GetLifetime() {
if (!isset( $this->refLifetime) || $this->refLifetime === false) if (!isset($this->refLifetime) || $this->refLifetime === false) {
if (PING_HIGHER_BOUND_LIFETIME !== false) {
return PING_HIGHER_BOUND_LIFETIME;
}
return 600; return 600;
}
return $this->refLifetime; return $this->refLifetime;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment