recover from errors in scan tags
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 15 Oct 2014 14:35:16 +0000 (16:35 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 15 Oct 2014 14:35:49 +0000 (16:35 +0200)
examples/selfcheck.js

index a9cba91..3c825bb 100644 (file)
@@ -140,7 +140,10 @@ function scan_tags() {
        } else {
                console.info('scan_tags');
                pending_jsonp++;
-               $.getJSON("/scan?callback=?", got_visible_tags);
+               $.getJSON("/scan?callback=?", got_visible_tags).fail( function(data) {
+                       console.error('scan error');
+                       pending_jsonp--;
+               });
        }
 
        if ( tick > 0 ) {