Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Handle heartbeats correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen committed Jul 27, 2013
1 parent e22e627 commit 9860bda
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/scripts/services/couch.js
Expand Up @@ -106,11 +106,16 @@ angular.module('glotApp').factory("Couch", function($http, $timeout, Response) {

function changeSuccess(res) {
timeout = 100;
if (active) {
if (!active) {
return;
}

// Ignore heartbeats
if (res) {
options.since = res.last_seq;
triggerListeners(res)
getChangesSince();
triggerListeners(res);
}
getChangesSince();
}

function changeError(res) {
Expand Down

0 comments on commit 9860bda

Please sign in to comment.