]> git.sesse.net Git - remoteglot/blobdiff - server/serve-analysis.js
Fix another Chess960 Chess.js issue.
[remoteglot] / server / serve-analysis.js
index ca9047f3df1767bf188ebbdd529b5dd8eb2ba997..86f2d9083aa9c229451a42acfa9edfba62daa97b 100644 (file)
@@ -101,6 +101,7 @@ var replace_json = function(new_json_contents, mtime) {
                        hash_lookup.init(parsed['internal']['grpc_backends']);
                }
                delete parsed['internal'];
+               new_json_contents = JSON.stringify(parsed);
        }
 
        var new_json = {
@@ -182,7 +183,7 @@ var reread_file = function(event, filename) {
        touch_timer = setTimeout(function() {
                console.log("Touching analysis.json due to no other activity");
                var now = Date.now() / 1000;
-               fs.utimes(json_filename, now, now);
+               fs.utimes(json_filename, now, now, function() {});
        }, 30000);
 }
 var possibly_wakeup_clients = function() {