{{Quickfixn}} quickfix initiator stop exception(Unhandled Exception: Cannot access a disposed object. Object name: 'FileLog'.)

杨飞 yangfeixf at 126.com
Wed Oct 26 20:14:33 PDT 2016


Hi,
We stop the socket initiator daily via below code:


//stop
if (initiator != null)
                {
                    Console.WriteLine("Shutting down FIX initiator engine");
                    logger.Debug("Shutting down FIX initiator engine");
                    initiator.Stop();
                    while (!initiator.IsStopped)
                    {
                        Thread.Sleep(2 * 1000);
                    }                
Sometimes below exception occured:
2016-10-26 22:00:06,092 [389] ERROR AlgoTrading.AlgoTrading -    at QuickFix.FileLog.DisposedCheck()
   at QuickFix.FileLog.OnEvent(String s)
   at QuickFix.Transport.SocketInitiator.SocketInitiatorThreadStart(Object socketInitiatorThread)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)


What we expect is no event should be handled since the initator is stopped. Any idea how to prevent event from being processed since the initator is stopped? Thanks.


Regards
Fei


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20161027/7813b968/attachment.htm>


More information about the Quickfixn mailing list