Properly clear heartbeat interval

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Vincent Petry 2017-03-02 10:11:56 +01:00 committed by Morris Jobke
parent 46a32045d7
commit ab37577182
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 1 additions and 1 deletions

View File

@ -1351,7 +1351,7 @@ function initCore() {
var url = OC.generateUrl('/heartbeat');
var heartBeatTimeout = null;
var heartBeat = function() {
clearTimeout(heartBeatTimeout);
clearInterval(heartBeatTimeout);
heartBeatTimeout = setInterval(function() {
$.post(url);
}, interval * 1000);