{{Quickfixn}} How do I force-disconnect FIX?
Thomas Tomiczek
t.tomiczek at nettecture.com
Fri Mar 23 01:05:04 PDT 2012
Overlooked that.
But then stop without true is broken, or? It does not even wait for a disconnect - so, it does not what name and expected standard .net behavior would imply?
Regards
Thomas
From: quickfixn-bounces at lists.quickfixn.com [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Rasheed Waraich
Sent: Friday, March 23, 2012 8:54 AM
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} How do I force-disconnect FIX?
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<mailto: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<mailto: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/2c26e430/attachment-0002.htm>
More information about the Quickfixn
mailing list