{{Quickfixn}} Bug report

Grant Birchmeier gbirchmeier at connamara.com
Mon Mar 19 07:03:43 PDT 2012


Thanks.  This issue has already been reported.
https://github.com/connamara/quickfixn/issues/42

-Grant


2012/3/19 Попов Алексей <popov at solidinvest.ru>

> Hi, I found a bug in QuickFix/n.
>
>
>
> It appears when machine is running continuously for about 25 days without
> reboot. This bug  appears because of using Environment.TickCount. This
> property gives signed int in result and MaxInt is about 25 days. So when 25
> days passed it gives negative result and when QuickFix starts OnStart
> method begins work not properly
>
>
>
> protected override void OnStart()
>
>         {
>
>             shutdownRequested_ = false;
>
>
>
>             while(!shutdownRequested_)
>
>             {
>
>                 int reconnectIntervalAsTicks = 1000 * reconnectInterval_;
>
>                 int nowTickCount = Environment.TickCount;
>
>
>
>
>
>                 if ((nowTickCount - lastConnectTickCount) >=
> reconnectIntervalAsTicks)
>
>                 {
>
>                     Connect();
>
>                     lastConnectTickCount = nowTickCount;
>
>                 }
>
>
>
>                 Thread.Sleep(1 * 1000);
>
>             }
>
>         }
>
>
>
> Error in check if ((nowTickCount - lastConnectTickCount) >=
> reconnectIntervalAsTicks)
>
>
>
> Initial value of lastConnectTickCount=0 negative-zero is negative and so
> smaller than reconnectIntervalAsTicks
>
> I fixed the bug by setting initial value of
> lastConnectTickCount=Environment.TickCount.
>
>
>
> Regards,
>
> Alexey Popov
>
> SOLID IFC, Moscow, Russia
>
> Tel.:+74952287010 ext. 1383
>
>
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>


-- 
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.*
*
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20120319/f75e225e/attachment-0002.htm>


More information about the Quickfixn mailing list