Skip to content

quickfix.ApplicationExtended#onBeforeSessionReset(SessionID) called only if session has responder and is logged on #327

Closed

Description

@simenflatby

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.

Activity

  1. chrjohn commented on May 12, 2021

    @chrjohn
    Member

    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.

  2. 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
  3. added theissue type on May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions