[Quickfix-developers] Infinite loop when receiving bad message in threaded acceptor
Brought to you by:
orenmnero
From: Yihu F. <Yih...@re...> - 2005-02-22 19:09:10
|
Oren, =20 When a threaded acceptor receives a garbled message, e.g. invalid length field, during an established FIX session, the QuickFIX engine runs into an infinite loop. =20 An example garbles message is like this, 8=3DTEST9=3DTEST35=3DTEST49=3DSS156=3DRORE34=3D352=3D20050222-16:45:5310=3D= TEST =20 Parser::extractLength() throws a MessageParserError exception because of field 9=3DTEST. =20 ThreadSocketConnection::readMessage() catches the exception but it does nothing and returns true. =20 This causes an infinite loop in the ThreadedSocketConnection::readQueue(). An empty string is passed to Session::next(), an InvalidMessage exception is thrown. However, because the session is in a logon on state, the session is not disconnected, but keeps going. =20 The session should be disconnected in the exception catch of either MessageParserError or InvalidMessage. =20 Thank you, =20 -Yihu ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. |