简体   繁体   中英

QuickFixN OnLogon NullReferenceException at QuickFix.Session.NextLogon

I can't tell what's wrong here. Admin and logon message code looks ok, the messages look ok, and data dictionary looks ok.

20211122-12:29:48.018 : Initiated logon request
20211122-12:29:48.129 : Sequence numbers reset due to ResetSeqNumFlag=Y
20211122-12:29:48.129 : Received logon
20211122-12:29:48.129 : Session FIX.4.4:FIX ENGINE.TEST/FIX.API->360T_RFQ_TEST disconnecting: System.NullReferenceException: Object reference not set to an instance of an object.
   at IsFixService.IsFixService.OnLogon(SessionID s)
   at QuickFix.Session.NextLogon(Message logon)
   at QuickFix.Session.Next(MessageBuilder msgBuilder)
   at QuickFix.SocketInitiatorThread.ProcessStream()
   at QuickFix.SocketInitiatorThread.Read()

The messages are

8=FIX.4.49=11935=A34=149=FIX ENGINE.TEST50=FIX.API52=20211122-12:29:48.01756=360T_RFQ_TEST98=0108=30141=Y554=pwd10=050
8=FIX.4.49=10235=A34=149=360T_RFQ_TEST52=20211122-12:29:48.06556=FIX ENGINE.TEST57=FIX.API98=0108=30141=Y10=160

I am confused why there would be a NextLogon at all because there is only 1 logon.

Ok I was confused between QuickFixN OnLogon override method, and the message cracker OnMessage(QuickFix.FIX44.Logon msg, SessionID s) method.

The OnMessage method was working fine. My onLogon method had a NullReferenceException trying to use an uninitalised logon monitoring cache. It was a bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM