在QF事件日志中有会话层事件:
20180418-13:30:51.268 : Connection failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond #.#.#.#:#
20180418-13:31:00.288 : Connecting to #.#.#.# on port #
20180418-13:31:21.293 : Connection failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond #.#.#.#:#
20180418-13:31:00.288 : Connecting to #.#.#.# on port #用于报告/反应这些事件的事件处理程序是什么?未调用OnLogout处理程序。
我不想使用FromEarlyIntercept,我猜它会捕捉到事件?
发布于 2019-02-08 06:50:54
此行为是设计出来的-没有建立连接,没有登录,因此在连接时网络故障后不会发生OnLogout事件。您可以看到该部分的源代码-在这种情况下,FromEarlyIntercept也不会触发。QuickFix/n只是记录错误,并将在ReconnectInterval秒后尝试重新连接。
try
{
t.Connect();
t.Initiator.SetConnected(t.Session.SessionID);
t.Session.Log.OnEvent("Connection succeeded");
t.Session.Next();
while (t.Read())
{ }
if (t.Initiator.IsStopped)
t.Initiator.RemoveThread(t);
t.Initiator.SetDisconnected(t.Session.SessionID);
}
catch (IOException ex) // Can be exception when connecting, during ssl authentication or when reading
{
t.Session.Log.OnEvent("Connection failed: " + ex.Message);
}
catch (SocketException e)
{
t.Session.Log.OnEvent("Connection failed: " + e.Message);
}https://stackoverflow.com/questions/49901230
复制相似问题