[Quickfix-developers] Unexpected session drops when start time greater than end time
Brought to you by:
orenmnero
|
From: Emil V. <que...@ho...> - 2005-05-09 07:56:23
|
Hi Oren,
We've come upon interesting problem when the QFix session drops unexpectedly
at what at first looks seemingly random time, with event message (Dropped
Connection) that looks like comm failure, if it wasn't the sequence
numberings reset too.
Here's how to reproduce - firstly the StartTime should be greater than the
end time.
In our case we had it accidentally setup to quite unrealistic values of
23:00 and 20:00 respectively.
Then suppose the session is started manually at 12:30 one day, then stopped
manually later, and then started at 10:00 the next day.
(Also note that here the sequence numbers weren't reset to 1 as this looks
like the same session to QFix. But unfortunatelly the other party we
connected to decided not to disconnect us because of this, but continued
happily with the last ones from previous day).
When 12:30 comes, I suppose the check checkSessionTime(now) in Session::next
was false, as the SessionTime::isSameSession looks like this when start time
> end time:
{
...
if ( start < end || start == end )
return time1Date == time2Date;
else if( start > end )
return labs(time1 - time2) < UTC_DAY;
}
which lead to calling of reset() in Session::next, Which dropped the
connection as it was active and with misleading message of 'Dropped
Connection'.
Guess that would be a problem if someone is using sessions that spawn across
midnight. I have a feeling that this check for < UTC_DAY won't work, without
having some concept of 'midnight in other venue's local time'
Cheers, Emil
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|