Re: [Quickfix-developers] Disconnect at 00:00:00 GMT problem
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2006-12-27 01:25:45
|
I believe we are accounting for this now. Week long and daily =20
sessions are now explicitly differentiated. Take a look at the =20
method isInRange:
bool isInRange()
{
DateTime now =3D m_useLocalTime ? DateTime::nowLocal() : =20
DateTime::nowUtc();
if( m_startDay < 0 && m_endDay < 0 )
return isInRange( m_startTime, m_endTime, now );
else
return isInRange
( m_startTime, m_endTime, m_startDay, m_endDay, now );
}
If the start and end day are less than 0, then then a daily session =20
is used, otherwise a weekly session is used. If you look at the =20
SessionFactory, you will notice that startDay and endDay default to =20
-1 and do not get set to a value unless StartDay/EndDay is in the =20
configuration file. So as long as he does not set them, his session =20
should always be treated as daily.
--oren
On Dec 26, 2006, at 11:01 PM, Brian Erst wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20
> html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> Oleg -
>
> I believe this was (partially) fixed in SVN. Looking at =20
> SessionTime.cpp, it looks like there was a change made on December =20
> 5, 2006 that would impact this issue.
>
> The previous code checked to see if the session start date was the =20
> same as the end date and, if so, did a simple time check that, =20
> alas, doesn't work if start time and end times are equal.
>
> Old code:
>
> if (startDay =3D=3D endDay)
> {
> if (timeOnly < startTime && timeOnly > endTime)
> return false;
> }
>
> That code fails if start and end times overlap (start late in one =20
> UTC day and end early in the next) or if they are the same. "00:00" =20=
> is less than the start time (22:30) but it isn't greater than the =20
> end time (22:30).
>
> New code:
>
> if (startDay =3D=3D endDay)
> {
> if (currentDay !=3D startDay)
> return true;
> return isSessionTime(startTime, endTime, time);
> }
>
> This change does three things: it makes an implicit assumption that =20=
> if startDay=3D=3DendDay that it must be a "week-long" session, if the =20=
> current day isn't the starting day, there is no need to check the =20
> time (time only applies to that day of the week), and finally, =20
> calls isSessionTime, which has a better time checking algorithm =20
> that tests for overlaps. This happily fixes a problem that I had =20
> two years ago (although I worked around the issue long ago).
>
> I don't know that it completely solves your problem though. It =20
> definitely would fix the "getting dumped at midnight" problem, but =20
> unless something upstream of this code has changed, I think it =20
> might introduce a "your session never ends" problem. Last I checked =20=
> (back in 1.11.x), QF had no way of distinguishing between a =20
> weeklong session (Friday late-Friday early) and a "daily" session =20
> (no start/end day). In both cases, the "start day" equaled the "end =20=
> day" (Fri-Fri was 5=3D=3D5, none was 1=3D=3D1). If this is still the =
case, =20
> the new code would see your config as a weeklong session with =20
> identical start/end times - which would mean nothing is EVER out of =20=
> session. Hopefully, something has been changed upstream and a =20
> "daily" session differs from a "weeklong" session.
>
> - Brian Erst
> Thynk Software, Inc.
>
>
> ----- Original Message ----
> From: Oleg Pecker <ol...@st...>
> To: qui...@li...
> Sent: Tuesday, December 26, 2006 11:13:53 AM
> Subject: [Quickfix-developers] Disconnect at 00:00:00 GMT problem
>
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20
> html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> Hi,
>
>
> I have a problem with disconnect.
>
> I=92ve implemented a FIX client using quickfix v 1.12.4 which is =20
> actually defined as "initiator".
>
>
> Here is my configuration file:
> StartTime=3D22:30:00 (IST =3D GMT + 22:30)
> EndTime=3D22:30:00 (IST: GMT + 22:30)
>
> SendResetSeqNumFlag=3DY
>
> ResetOnLogout=3DY
>
> ResetOnDisconnect=3DY
>
> ReconnectInterval=3D20
>
> HeartBtInt=3D20
>
>
> The problem is that my client (the initiator) disconnects exactly =20
> at 00:00:00 GMT and does not reconnect.
>
> Does any one know what could be the problem?
>
>
> Thanks,
>
> Oleg
>
>
> ----------------------------------------------------------------------=20=
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to =20
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?=20
> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
> ----------------------------------------------------------------------=20=
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to =20
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?=20
> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________=
____=20
> _______________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
|