当我的 RTD 服务器启动时,它会通过 ServerStart 和 ConnectData 调用,然后就在数据开始到达时,它会调用 ServerTerminate 来关闭一切。我添加了一个堆栈跟踪转储,但这并没有告诉我任何有用的信息:
public void ServerTerminate()
{
Logger.DebugLog("TRACE: ServerTerminate {0}", new System.Diagnostics.StackTrace(true));
timer_.Dispose();
DataSource.Shutdown();
topicIdMap_.Clear();
fieldLookup_.Clear();
}
2014-09-18 11:22:12Z TRACE: ServerTerminate at Mike.RtdServer.ServerTerminate() in c:\Code\Mike\RtdServer.cs:line 347
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
什么可能导致对 ServerTerminate 的调用?