[Quickfix-developers] Re: [CVS] ThreadedSocketAcceptor crashes on version mismatch
Brought to you by:
orenmnero
From: Caleb E. <cal...@gm...> - 2005-03-09 15:40:17
|
On Wed, 9 Mar 2005 09:09:32 -0500, Caleb Epstein <cal...@gm...> wrote: > Using CVS code as-of 2005-02-25. If a client connects to a QF > acceptor which is using the ThreadedSocketAcceptor and there is a > mismatch between the FIX BeginStrings for that session, the acceptor > application crashes. Using the single-threaded SocketAcceptor, no > crash happens; the acceptor closes the connection gracefully (though > nothing is logged). Here's a patch that seems to fix the problem here: --- quickfix-CVS-20050225-pristine/src/C++/ThreadedSocketConnection.cpp 2005-02-25 16:22:03.000000000 -0500 +++ quickfix-CVS-20050225/src/C++/ThreadedSocketConnection.cpp 2005-03-09 10:35:24.000000000 -0500 @@ -102,7 +102,8 @@ } catch ( SocketRecvFailed& e ) { - m_pSession->getLog()->onEvent( e.what() ); + if (m_pSession) + m_pSession->getLog()->onEvent( e.what() ); delete [] buffer; m_queue.push( std::make_pair((size_t)0, (char*)0) ); return false; On a related note, whats the status of providing a Log member in the Application class for stuff like this? -- Caleb Epstein caleb dot epstein at gmail dot com |