X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=f6b4c43c7d7409a23385ee39c5273d7efc9d45c5;hp=9a2b5fda422e59d35799f4aff7596e685c9fd84c;hb=9bf6d89b4b7a2fa44352d35f21a9ed817b9f5106;hpb=ae8b820b96ab4e5a4b2551157f23724b3702c891 diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 9a2b5fd..f6b4c43 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -17,6 +17,9 @@ var request_update = function(board) { ims = xhr.getResponseHeader('X-Remoteglot-Last-Modified'); var num_viewers = xhr.getResponseHeader('X-Remoteglot-Num-Viewers'); update_board(board, data, num_viewers); + }).fail(function() { + // Wait ten seconds, then try again. + setTimeout(function() { request_update(board); }, 10000); }); }