recover from errors in scan tags
[Biblio-RFID.git] / 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 ) {