{{Quickfixn}} Order of Session.OnCreate and session settings being set

Staffan Ulfberg staffan at ulfberg.se
Thu Feb 2 04:36:39 PST 2017


Hi,

When sessions are created (in SessionFactory.Create), the OnCreate callback
is called during construction of the Session object, and then the session
settings are applied. I would argue that is bug prone (at least we had a
bug related to this), in that it is easy to assume that it is possible to
read the session settings from the session properties in the OnCreate
method. (In our case we use the MaxLatency property.)

So, I would suggest that the call to OnCreate is moved to be done after the
settings are applied.  If not, I suggest reading the properties should
throw an exception and not just return default values until they are set...

Staffan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20170202/6edb9d08/attachment.htm>


More information about the Quickfixn mailing list