You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
quickfix.ApplicationExtended#onBeforeSessionReset(SessionID) called only if session has responder and is logged on #327
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 and EndTime and wait for quickfix.Session#reset() to get called by quickfix.Session#resetIfSessionNotCurrent(SessionID, long) before logging on when entering StartTime 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 to quickfix.ApplicationExtended#onBeforeSessionReset(SessionID) to the top of the try block.
system information:
OS: CentOS
Java version: JDK8
QFJ Version: 2.2.0
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.
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 SessionStateListenerobject 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.
changed the title [-]quickfix.ApplicationExtended#onBeforeSessionReset(SessionID) called only if session has responder and is logged on[/-][+]`quickfix.ApplicationExtended#onBeforeSessionReset(SessionID)` called only if session has responder and is logged on[/+]on May 12, 2021
Activity
chrjohn commentedon May 12, 2021
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
SessionStateListenerobject which has similar callbacks already. For exampleonReset()which is called after reset which makes it impossible to do any stuff with the content of theMessageStorebefore it is getting reset.[-]quickfix.ApplicationExtended#onBeforeSessionReset(SessionID) called only if session has responder and is logged on[/-][+]`quickfix.ApplicationExtended#onBeforeSessionReset(SessionID)` called only if session has responder and is logged on[/+]