{{Quickfixn}} How do I force-disconnect FIX?

Rasheed Waraich rashiedwaraich at gmail.com
Fri Mar 23 00:54:15 PDT 2012


Hi Thomas,

One solution is to pass "true" in the stop method. It will forcefully close
the session (logout).
i.e.
upPriceInitiator.Stop(true);

On Fri, Mar 23, 2012 at 7:51 AM, Thomas Tomiczek
<t.tomiczek at nettecture.com>wrote:

>  I am asking because… calling Stop on an initiator does not work (data
> still flows in). At the same time, there is no dispose method there (should
> it not implement IDisposable? After all it has internal threads)?****
>
> ** **
>
> I am creating for example a price link like that:****
>
> ** **
>
>             var upPricePath = Path.Combine(folder, "Fix.UpPrice.cfg");****
>
>             SessionSettings upPriceSettings = new SessionSettings
> (upPricePath);****
>
>             MessageStoreFactory upPriceStore = new FileStoreFactory
> (upPriceSettings);****
>
>             LogFactory upPriceLog = new FileLogFactory(upPriceSettings);**
> **
>
>             upPriceInitiator = new QuickFix.Transport.SocketInitiator(upPrice,
> upPriceStore, upPriceSettings, upPriceLog);****
>
>             upPriceInitiator.Start();****
>
> ** **
>
> Closing it like this:****
>
> ** **
>
>             upPriceInitiator.Stop();****
>
>             upPriceInitiator = null;****
>
> ** **
>
> does NOT result in for example the port of the FIX session being made
> available – this is bad. I need the ability to take down then re-establish
> initiators (for example to change the configuration file).****
>
> ** **
>
> Also, when I have a long running request (request security definitions)
> then…. Well…. The data keeps pouring in.****
>
> ** **
>
> So what is the best / standard method to FORCE logout an initiator? In my
> opionion:****
>
> ** **
>
> **·         **SocketInitiator should implement IDisposable properly,
> releaseing all unmanaged ressourcs. It is in fact a form error in FxCop to
> hold a reference to something that is IDisposable (socket) and not be
> disposable.****
>
> **·         **Force-Logouts on Stop****
>
> **·         **Release all ressources on Stop.****
>
> ** **
>
> Regards****
>
> ** **
>
> Thomas****
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>


-- 
//Regards
Rasheed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20120323/611209d7/attachment-0002.htm>


More information about the Quickfixn mailing list