[Quickfix-developers] Session disconnect/send synchronization patch
Brought to you by:
orenmnero
From: Gene G. <mus...@ya...> - 2003-04-04 19:29:56
|
I have FIX:Session that has messages send to it from multiple threads. I have discovered (the hard way) that under certain conditions Session::send crashes. It happens when simultaneously there is a Session::disconnect called from another thread, for example when FIX session counterpart closes socket. Session::disconnect deletes m_Responder, if that happens after Session::send checks for m_Responder for presence, but before it is finished using it, crash ensues. The fix is to guard Session::disconnect with the same mutex that guards Session::sendRaw. I have attached patch that does just that. Gene __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com |