mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-19 21:10:43 +02:00
Fixed KeepAlive issue where too large of a session value would fire the keep alive immediately (fixes #1860)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
* Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937)
|
||||
* Fixed remodal issue triggering close when selecting a dropdown item ending outside of scope [#1682](https://github.com/getgrav/grav-plugin-admin/issues/1682)
|
||||
* Reworked how collapsed lists work so the tooltip is not cut off [#1928](https://github.com/getgrav/grav-plugin-admin/issues/1928)
|
||||
* Fixed KeepAlive issue where too large of a session value would fire the keep alive immediately [#1860](https://github.com/getgrav/grav-plugin-admin/issues/1860)
|
||||
|
||||
# v1.10.0-rc.17
|
||||
## 10/07/2020
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { config } from 'grav-config';
|
||||
import { userFeedbackError } from './response';
|
||||
|
||||
const MAX_SAFE_DELAY = 2147483647;
|
||||
|
||||
class KeepAlive {
|
||||
constructor() {
|
||||
this.active = false;
|
||||
@@ -8,7 +10,7 @@ class KeepAlive {
|
||||
|
||||
start() {
|
||||
let timeout = config.admin_timeout / 1.5 * 1000;
|
||||
this.timer = setInterval(() => this.fetch(), timeout);
|
||||
this.timer = setInterval(() => this.fetch(), Math.min(timeout, MAX_SAFE_DELAY));
|
||||
this.active = true;
|
||||
}
|
||||
|
||||
|
||||
2
themes/grav/js/admin.min.js
vendored
2
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user