Created by: svanharmelen
Without this commit, I get data race errors when I’ve build my binary with go build -race
:
WARNING: DATA RACE
Read at 0x00c4201a4368 by main goroutine:
github.com/quickfixgo/quickfix.(*memoryStore).NextSenderMsgSeqNum()
<autogenerated>:1 +0x53
github.com/quickfixgo/quickfix.(*session).prepMessageForSend()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session.go:279 +0x9a
github.com/quickfixgo/quickfix.(*session).queueForSend()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session.go:204 +0xcd
github.com/quickfixgo/quickfix.SendToTarget()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/registry.go:50 +0xb3
main.(*Router).sendRequests()
/Users/svanharmelen/Documents/GoCode/src/github.com/svanharmelen/xtdr/cmd/marketdata/router.go:99 +0x4b1
main.(*Router).Subscribe()
/Users/svanharmelen/Documents/GoCode/src/github.com/svanharmelen/xtdr/cmd/marketdata/router.go:61 +0xc4
main.main()
/Users/svanharmelen/Documents/GoCode/src/github.com/svanharmelen/xtdr/cmd/marketdata/main.go:66 +0x640
Previous write at 0x00c4201a4368 by goroutine 9:
github.com/quickfixgo/quickfix.(*memoryStore).IncrNextTargetMsgSeqNum()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/store.go:52 +0x64
github.com/quickfixgo/quickfix.(*session).handleLogon()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session.go:453 +0x3f3
github.com/quickfixgo/quickfix.logonState.FixMsgIn()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/logon_state.go:24 +0x150
github.com/quickfixgo/quickfix.(*logonState).FixMsgIn()
<autogenerated>:1 +0x76
github.com/quickfixgo/quickfix.(*stateMachine).fixMsgIn()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session_state.go:87 +0x69
github.com/quickfixgo/quickfix.(*stateMachine).Incoming()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session_state.go:77 +0x4fe
github.com/quickfixgo/quickfix.(*session).run()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/session.go:751 +0x567
github.com/quickfixgo/quickfix.(*Initiator).handleConnection.func1()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/initiator.go:114 +0x38
Goroutine 9 (running) created at:
github.com/quickfixgo/quickfix.(*Initiator).handleConnection()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/initiator.go:113 +0xcf
github.com/quickfixgo/quickfix.(*Initiator).Start.func1()
/Users/svanharmelen/Documents/GoCode/src/github.com/quickfixgo/quickfix/initiator.go:38 +0xe0