[Quickfix-developers] ThreadedSocketInitiator::onStart hangs if called before session s tart-time
Brought to you by:
orenmnero
From: Requenes, M. <Max...@sa...> - 2004-05-19 12:40:51
|
I'm running a CVS'd checkout of QuickFix between the 1.6.0 and 1.7.0 releases; on Solaris, GCC 2.95.3, buy side; using ThreadedSocketInitiator. I am having a problem initiating connections to brokers when starting Quickfix before the configured start-times for the connections. I've checked QF 1.7.1, and the problem/solution I'm about to describe still applies. The scenario is as follows: I have connections to multiple brokers, with multiple start times ranging from 8:30 am to 8:35 am. If I start the application BEFORE 8:30 am, ThreadedSocketInitiator::onStart calls 'connect', which sees that the sessions aren't in their configured time range, then goes into an infinite wait loop. It never tries to reconnect. void ThreadedSocketInitiator::onStart() { connect(); while ( !m_stop) process_sleep( 1 ); } The fix I propose is to place the call to 'connect' within the body of the wait loop. void ThreadedSocketInitiator::onStart() { while ( !m_stop) { connect(); process_sleep( 1 ); } } Do you see any problems with this? BTW, this problem is also described in this QF mailing list thread (in the initial message only): http://sourceforge.net/mailarchive/forum.php?thread_id=3738929&forum_id=103 Regards, Max Requenes SAC Capital Management, LLC 212-813-8696 max...@sa... DISCLAIMER: This e-mail message and any attachments are intended solely for the use of the individual or entity to which it is addressed and may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete this message and any attachments. |