Skip to content

Commit

Permalink
sync stats far less
Browse files Browse the repository at this point in the history
  • Loading branch information
inorton committed Jun 1, 2014
1 parent ca2bdd1 commit 9c2bd0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions CClash/CClashServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public void Listen(string cachedir)
NewServerThread(cachedir);
}
}
cache.SetupStats();
if (DateTime.Now.Subtract(lastRequest).TotalMinutes > QuitAfterIdleMinutes)
{
quitnow = true;
Expand All @@ -203,7 +202,7 @@ public void Listen(string cachedir)
t.Join(2000);
}


cache.SetupStats();
Logging.Emit("server quitting");
mtx.ReleaseMutex();

Expand All @@ -228,7 +227,6 @@ public CClashResponse ProcessRequest(CClashRequest req)
case Command.GetStats:
rv.exitcode = 0;
cache.SetupStats(); // commits stats to disk

rv.stdout = StatOutputs.GetStatsString(req.compiler, cache);
break;

Expand All @@ -241,16 +239,11 @@ public CClashResponse ProcessRequest(CClashRequest req)
rv.supported = true;
rv.stderr = stderr.ToString();
rv.stdout = stdout.ToString();
if (Environment.CurrentDirectory != mydocs)
{
//rv.exitcode = -1;
//rv.supported = false;
//rv.stderr = string.Format("cclash server error: server cwd has changed from {0} to {1}!!", mydocs, Environment.CurrentDirectory);
//rv.stdout = string.Empty;
}

break;

case Command.Quit:
cache.SetupStats();
Stop();
break;
}
Expand Down
Binary file modified Installer/Installer/Express/DVD-5/DiskImages/DISK1/Setup.ini
Binary file not shown.
Binary file modified cclash.v11.suo
Binary file not shown.

0 comments on commit 9c2bd0c

Please sign in to comment.