Follow up to #360 where an incoming connection is rejected via a Logout message when the session is not enabled.
It should also be possible to just close the incoming connection in AcceptorIoHandler when the session's enabled flag is false. Probably it would be best if this was configurable.
|
protected void processMessage(IoSession protocolSession, Message message) throws Exception { |
|
Session qfSession = (Session) protocolSession.getAttribute(SessionConnector.QF_SESSION); |
|
if (qfSession == null) { |
|
final Optional<String> msgTypeField = message.getHeader().getOptionalString(MsgType.FIELD); |
|
if (msgTypeField.isPresent() && msgTypeField.get().equals(MsgType.LOGON)) { |
|
final SessionID sessionID = MessageUtils.getReverseSessionID(message); |
|
qfSession = sessionProvider.getSession(sessionID, eventHandlingStrategy.getSessionConnector()); |
|
if (qfSession != null) { |
...
Follow up to #360 where an incoming connection is rejected via a Logout message when the session is not enabled.
It should also be possible to just close the incoming connection in
AcceptorIoHandlerwhen the session'senabledflag isfalse. Probably it would be best if this was configurable.quickfixj/quickfixj-core/src/main/java/quickfix/mina/acceptor/AcceptorIoHandler.java
Lines 62 to 69 in 77f21e7
...