Skip to content

Session state is set incorrectly when MessageStore cannot persist Logon message #1302

Description

@gokayhuz

Describe the bug
When QFJ receives a Logon message for an incoming session, it:

  1. callsgenerateLogon(),
  2. (which) generates a Logon message,
  3. calls sendRaw()
  4. (finally) calls state.setLogonSent(true) on the Session object.

Here the return value of sendRaw() is not checked. and QFJ assumes a Logon message has been sent to the counterparty (even in cases where it has not). From this point on, the Application will be able to send messages to the counterparty.

if however, the call to MessageStore.persist() fails and the outgoing message cannot be persisted (due to an IOException for example), Session.send() is never invoked and message is not sent to the counterparty. But still QFJ calls state.setLogonSent(true). Any further outgoing messages to the counterparty will be rejected as they will be waiting for a Logon message

Expected behavior
in Session.generateLogon(), the return value of sendRaw() call should be checked, and state.setLogonSent(true) should be called only if sendRaw() has returned true

system information:
environment/version independent. But is still present as of the latest commit on 18.5.2026 and 3.0.2

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