{{Quickfixn}} How to logoff? FileLog error: System.ObjectDisposedException

Manuel Lopez lopez.post at gmail.com
Mon Jan 6 11:05:23 PST 2014


One thought is that perhaps I should be implementing the IDisposable
interface in order to do a session close and logout.  (Didn't see that
in the sample app, which just does a logout().)

On Mon, Jan 6, 2014 at 12:47 AM, Manuel Lopez <lopez.post at gmail.com> wrote:
> If I'm not doing something wrong, I may have run into a bug with
> quickfix 1.5.  Almost any version of this code eventually (usually
> after some delay) produces a disposed exception in filelog ("init" is
> an instance of SocketInitiator):
>                 if (init != null)
>                 {
>                     if (init.IsStopped == false)
>                     {
>                         init.Stop(); //this by itself gives an error eventually
>                         //init.Stop(true) // and so does this.
>                     }
>                     // init.Dispose();  // this also gives the same error.
>                 }
>
> Is there another way of closing down the connection (init.Stop() is in
> the sample app)?   Thanks.
>
> The error I get is:
> An unhandled exception of type 'System.ObjectDisposedException'
> occurred in QuickFix.dll
> Cannot access a disposed object.
> Object name: 'FileLog'.
>    at QuickFix.FileLog.DisposedCheck() in
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line
> 68
>    at QuickFix.FileLog.OnEvent(String s) in
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line
> 112
>    at QuickFix.Transport.SocketInitiator.SocketInitiatorThreadStart(Object
> socketInitiatorThread) in
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\Transport\SocketInitiator.cs:line
> 77
>    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
>    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)
>    at System.Threading.ThreadHelper.ThreadStart(Object obj)



More information about the Quickfixn mailing list