<div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000">Miguel,</div><div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">
Looks like we might have some kind of timing condition here. Every instance of FileLog should only be disposed once. It's apparently happening twice.</div><div class="gmail_default" style="font-size:small;color:#000000">
<br></div><div class="gmail_default" style="font-size:small;color:#000000">Does it always happen on the second time you call Stop()?</div><div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">
-Grant</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 1:05 PM, Manuel Lopez <span dir="ltr"><<a href="mailto:lopez.post@gmail.com" target="_blank">lopez.post@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One thought is that perhaps I should be implementing the IDisposable<br>
interface in order to do a session close and logout. (Didn't see that<br>
in the sample app, which just does a logout().)<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Jan 6, 2014 at 12:47 AM, Manuel Lopez <<a href="mailto:lopez.post@gmail.com">lopez.post@gmail.com</a>> wrote:<br>
> If I'm not doing something wrong, I may have run into a bug with<br>
> quickfix 1.5. Almost any version of this code eventually (usually<br>
> after some delay) produces a disposed exception in filelog ("init" is<br>
> an instance of SocketInitiator):<br>
> if (init != null)<br>
> {<br>
> if (init.IsStopped == false)<br>
> {<br>
> init.Stop(); //this by itself gives an error eventually<br>
> //init.Stop(true) // and so does this.<br>
> }<br>
> // init.Dispose(); // this also gives the same error.<br>
> }<br>
><br>
> Is there another way of closing down the connection (init.Stop() is in<br>
> the sample app)? Thanks.<br>
><br>
> The error I get is:<br>
> An unhandled exception of type 'System.ObjectDisposedException'<br>
> occurred in QuickFix.dll<br>
> Cannot access a disposed object.<br>
> Object name: 'FileLog'.<br>
> at QuickFix.FileLog.DisposedCheck() in<br>
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line<br>
> 68<br>
> at QuickFix.FileLog.OnEvent(String s) in<br>
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line<br>
> 112<br>
> at QuickFix.Transport.SocketInitiator.SocketInitiatorThreadStart(Object<br>
> socketInitiatorThread) in<br>
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\Transport\SocketInitiator.cs:line<br>
> 77<br>
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br>
> at System.Threading.ExecutionContext.RunInternal(ExecutionContext<br>
> executionContext, ContextCallback callback, Object state, Boolean<br>
> preserveSyncCtx)<br>
> at System.Threading.ExecutionContext.Run(ExecutionContext<br>
> executionContext, ContextCallback callback, Object state, Boolean<br>
> preserveSyncCtx)<br>
> at System.Threading.ExecutionContext.Run(ExecutionContext<br>
> executionContext, ContextCallback callback, Object state)<br>
> at System.Threading.ThreadHelper.ThreadStart(Object obj)<br>
_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font><span style="background-color:#000000"><span style="background-color:#ffffff">Grant Birchmeier</span></span></font><font><font color="#3333ff"><br>
</font></font></div><div><font><b><font color="#3333ff"><span style="background-color:#ffcc33"><span style="background-color:#ffcc66"><span style="background-color:#ffcc99"><span style="background-color:#ffffff"><span style="background-color:#ffcc00">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br>
</div><div><font><b>Made-To-Measure Trading Solutions.</b></font></div><div><font>Exactly what you need. No more. No less.</font><font><b><font color="#3333ff"><br></font></b></font></div><div><font><a href="http://connamara.com" target="_blank">http://connamara.com</a><br>
</font></div>
</div>