<div dir="ltr"><div dir="ltr">On Fri, Feb 28, 2020 at 8:56 AM Mark Smith <<a href="mailto:msmith@rpia.ca">msmith@rpia.ca</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_264566384294468085WordSection1">
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue">using</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> (Initiator)<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:9.5pt;font-family:Consolas;color:black">Initiator.Start();</span></p></div></div></blockquote><div><br></div><div>The Initiator's <font face="monospace"><b>Start()</b></font> method does not block.  If you allow the main thread to continue outside of that <font face="monospace"><b>using</b></font> block, your Initiator is going to be disposed, which is going to attempt to dispose your log files, etc...  hence the error where the Initiator is trying to write to closed logs.</div><div><br></div><div>You could enter a while loop (like <font face="monospace">Examples/TradeClient/TradeClientApp.cs </font>does), or block/wait on a condition, or both.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">--</font></div><font face="arial, helvetica, sans-serif">Mike Gatny</font></div><div dir="ltr"><span style="font-family:arial,helvetica,sans-serif">Connamara Systems</span><br></div></div></div></div></div><div> </div></div></div>

<br>
<span style="color:rgb(29,28,29);font-family:Slack-Lato,appleLogo,sans-serif;white-space:pre-wrap;background-color:white"><font size="2">This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.</font></span>