Open simenflatby opened 4 years ago
I also think onBeforeSessionReset(SessionID)
should be called when a session is not logged on. It can happen that messages are put to the store without an active session. In my opinion this is rather common.
Moreover I am asking myself if this callback would be better off in the SessionStateListener
object which has similar callbacks already. For example onReset()
which is called after reset which makes it impossible to do any stuff with the content of the MessageStore
before it is getting reset.
Describe the bug
quickfix.ApplicationExtended#onBeforeSessionReset(SessionID)
is called only if the session has a responder and is logged on.To Reproduce Setup an application with
StartTime
andEndTime
and wait forquickfix.Session#reset()
to get called byquickfix.Session#resetIfSessionNotCurrent(SessionID, long)
before logging on when enteringStartTime
with a non current session.Expected behavior
quickfix.ApplicationExtended#onBeforeSessionReset(SessionID)
gets called even if the session is not logged on. Proposed solution: Move the call toquickfix.ApplicationExtended#onBeforeSessionReset(SessionID)
to the top of thetry
block.system information:
Additional context Not sure if this qualifies as a bug or if it actually works as intended. Please discard and close the issue if it works as intended.