On Fri, Feb 24, 2012 at 3:42 AM, Rasheed Waraich <span dir="ltr"><<a href="mailto:rashiedwaraich@gmail.com">rashiedwaraich@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What is the reason that OnLogout is never called when you pass true in the "_initiator.Stop(true);"?<br></blockquote><div><br></div><div>This may be a bug. You should get an OnLogout for a session whenever a Logout is received on that session, or if the connection is suddenly disconnected.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Secondly what is the difference between "_initiator.Stop();" and "_initiator.Stop(true);"? Can you please recommend that under what use-cases should we use either of them?<br clear="all">
</blockquote><div><br></div><div>Calling Initiator.Stop() logs out all sessions, and then waits to ensure that they are all logged out cleanly. If you call Initiator.Stop(true), the initiator will attempt to logout the sessions, but it will not wait to ensure that it is done cleanly. You should use Stop() in most cases. However, if your application has encountered a fatal error/exception and you want it to shut down immediately, use Stop(true).</div>
<div><br></div></div>-- <br><font face="arial, helvetica, sans-serif">Mike Gatny<br>Connamara Systems, LLC</font><br>