Suppressing errors if keep alive was not possible
authorAlexander Ebert <ebert@woltlab.com>
Wed, 3 Apr 2013 00:22:09 +0000 (02:22 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 3 Apr 2013 00:22:09 +0000 (02:22 +0200)
wcfsetup/install/files/js/WCF.js

index a627f2e8f00d3c6d0c04bd098504b8152b12f483..24291da2562aee89153371e40fe26d899aa5cf92 100755 (executable)
@@ -1489,7 +1489,7 @@ WCF.Action.Proxy = Class.extend({
                this.confirmationDialog = null;
                this.loading = null;
                this._showLoadingOverlayOnce = false;
-               this._suppressErrors = (this.options === true);
+               this._suppressErrors = (this.options.suppressErrors === true);
                
                // send request immediately after initialization
                if (this.options.autoSend) {
@@ -5506,13 +5506,14 @@ WCF.System.KeepAlive = Class.extend({
         * @param       integer         seconds
         */
        init: function(seconds) {
-               new WCF.PeriodicalExecuter(function() {
+               new WCF.PeriodicalExecuter(function(pe) {
                        new WCF.Action.Proxy({
                                autoSend: true,
                                data: {
                                        actionName: 'keepAlive',
                                        className: 'wcf\\data\\session\\SessionAction'
                                },
+                               failure: function() { pe.stop(); },
                                showLoadingOverlay: false,
                                suppressErrors: true
                        });