Session not explicitly handling DoNotSend from Application::ToApp #266
Closed
Description
From IApplication,
////// This is a callback for application messages that you are sending to a /// counterparty. If you throw a DoNotSend exception in this function, the /// application will not send the message. This is mostly useful if the /// application has been asked to resend a message such as an order that is /// no longer relevant for the current market. Messages that are being resent /// are marked with the PossDupFlag in the header set to true; If a DoNotSend /// exception is thrown and the flag is set to true, a sequence reset will be /// sent in place of the message. If it is set to false, the message will /// simply not be sent. You may add fields before an application message /// before it is sent out. /// /// /// /// throw this to abort sending the message void ToApp(Message message, SessionID sessionId);
Note however that Session does not explicitly handle DoNotSend
Exceptions.
https://github.com/connamara/quickfixn/blob/master/QuickFIXn/Session.cs#L1585
A try/catch should surround this call and return false if DoNotSend
is thrown by the Application.