summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-17 08:13:28 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-17 08:13:28 +0100
commita2b638320425309dd9af9ec8d53b925890628783 (patch)
treef1087da33d776fe5a5f6c7b4907dfd98294d024f
parenta84efc689deded1a6593eed613e5270be562ec68 (diff)
Fix keep-alive interval reset on AJAX request
-rw-r--r--program/js/app.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js
index a0cf5f834..f1df73cee 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6128,14 +6128,14 @@ function rcube_webmail()
// send request
this.log('HTTP GET: ' + url);
+ // reset keep-alive interval
+ this.start_keepalive();
+
return $.ajax({
type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json',
success: function(data){ ref.http_response(data); },
error: function(o, status, err) { ref.http_error(o, status, err, lock, action); }
});
-
- // reset keep-alive interval
- this.start_keepalive();
};
// send a http POST request to the server
@@ -6163,14 +6163,14 @@ function rcube_webmail()
// send request
this.log('HTTP POST: ' + url);
+ // reset keep-alive interval
+ this.start_keepalive();
+
return $.ajax({
type: 'POST', url: url, data: postdata, dataType: 'json',
success: function(data){ ref.http_response(data); },
error: function(o, status, err) { ref.http_error(o, status, err, lock, action); }
});
-
- // reset keep-alive interval
- this.start_keepalive();
};
// aborts ajax request