提交 e4f5d13a 编写于 作者: A angocke

Log die timeout in the compiler server and any failures associated with...

Log die timeout in the compiler server and any failures associated with reading the app.config file. (changeset 1276486)
上级 88a2c3ca
......@@ -7,7 +7,7 @@
<gcConcurrent enabled="false"/>
</runtime>
<appSettings>
<!-- Nubmer of seconds with no activity before the server times out and closes.
<!-- Number of seconds with no activity before the server times out and closes.
Set to 0 to shut down the server after the first connection is finished
or -1 to never shut down the server. -->
<add key="dieTimeout" value="10800"/>
......
......@@ -42,6 +42,9 @@ partial class ServerDispatcher
/// </summary>
public static int Main(string[] args)
{
CompilerServerLogger.Initialize("SRV");
CompilerServerLogger.Log("Process started");
int dieTimeout;
// Try to get the die timeout from the app.config file.
// Set to default if any failures
......@@ -58,16 +61,16 @@ public static int Main(string[] args)
// seconds, not milliseconds
dieTimeout *= 1000;
}
CompilerServerLogger.Log("Die timeout is: " + dieTimeout + "milliseconds.");
}
catch (ConfigurationErrorsException)
catch (ConfigurationErrorsException e)
{
dieTimeout = DefaultServerDieTimeout;
CompilerServerLogger.LogException(e, "Could not read AppSettings");
}
CompilerFatalError.Handler = FailFast.OnFatalException;
CompilerServerLogger.Initialize("SRV");
CompilerServerLogger.Log("Process started");
var dispatcher = new ServerDispatcher(BuildProtocolConstants.PipeName,
new CompilerRequestHandler(),
dieTimeout);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册