From: Steinar H. Gunderson Date: Mon, 13 Jun 2016 13:38:53 +0000 (+0200) Subject: Fix a deadlock in the JSON loading code in serve-analysis.js. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=a4f9d909178162cf82b601fa515e7400eaaf48ca Fix a deadlock in the JSON loading code in serve-analysis.js. --- diff --git a/server/serve-analysis.js b/server/serve-analysis.js index ce1f89d..22bc20d 100644 --- a/server/serve-analysis.js +++ b/server/serve-analysis.js @@ -145,7 +145,7 @@ var reread_file = function(event, filename) { if (json_lock == 1) { // Already processing; wait a bit. json_lock = 2; - setTimeout(function() { json_lock = 1; reread_file(event, filename); }, 100); + setTimeout(function() { if (json_lock == 2) json_lock = 1; reread_file(event, filename); }, 100); return; } json_lock = 1;