Skip to content

Conversation

@bhaan
Copy link
Contributor

@bhaan bhaan commented Jun 30, 2016

Changes proposed in this pull request:

  • Updates acceptor/initiator stop sequence. Sends a Logout and waits for a response before invoking the application OnLogout callback, per FIX standard
  • Removes redundant calls to the application OnLogout callback. Currently, the run() function in session ultimately invokes OnLogout when it returns, while the inSession state has a few cases where it invokes the callback as well.
  • Improves the event log output for the logon and logout sequences. Following the QuickFIX/C++ implementation, a proper session event sequence will look like the following:
Initiator
2016/06/30 15:31:45.167656 Sending logon request
2016/06/30 15:31:45.185684 Received logon response
2016/06/30 15:31:49.810696 Inititated logout request
2016/06/30 15:31:49.825808 Received logout response
2016/06/30 15:31:49.825833 Disconnected
Acceptor
2016/06/30 15:31:45.170768 Received logon request
2016/06/30 15:31:45.182621 Responding to logon request
2016/06/30 15:31:49.814847 Received logout request
2016/06/30 15:31:49.815776 Sending logout response
2016/06/30 15:31:49.827149 Disconnected

logout_state.go Outdated
func (state logoutState) FixMsgIn(session *session, msg Message) (nextState sessionState) {
return state
var msgType FIXString
if err := msg.Header.GetField(tagMsgType, &msgType); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity, might be better to return immediately if err!=nil and avoid the else clause

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me: 9075d98

@cbusbey
Copy link
Contributor

cbusbey commented Jun 30, 2016

🎂 🐙

@cbusbey cbusbey merged commit 1ee85d1 into quickfixgo:master Jun 30, 2016
@cbusbey cbusbey added this to the v0.4.0 milestone Jun 30, 2016
@cbusbey cbusbey added the Bug Behavior not matching expected label Jun 30, 2016
@bhaan bhaan deleted the logout-process branch June 30, 2016 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Behavior not matching expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants