RE: [Quickfix-developers] SocketInitiator.stop()
Brought to you by:
orenmnero
From: John D. <joh...@ch...> - 2005-03-23 17:09:09
|
Has anyone experienced similar behavior? Does anyone have a solution? We are using QuickFIX 1.9.3. Thanks, John ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Patrick Flannery Sent: Friday, March 18, 2005 1:57 PM To: qui...@li... Subject: [Quickfix-developers] SocketInitiator.stop() Hello, There were some recent messages about the SocketInitiator::stop() causing a deadlock. An update was posted in cvs where the code has a flag allowing the user to force a close. The C# version of SocketInitiator does not have this same flag and may be needed because the SocketInitiator.stop() function deadlocks. Also, and this is real simple, is this correct way to start a fix session? void start(){ initiator.start(); //Wait for the FIX.onLogon(Session ) to be signaled. WaitForConnect(CONNECT_TIMEOUT); //Fix logon QuickFix44.Logon fixLogon = new Logon(); fix.Send(fixLogon); //Application Logon QuickFix44.UserRequest logon = new QuickFix44.UserRequest(); QuoterParamaters fields = new QuoterParamaters(credentials); Set(logon, new UserRequestType(UserRequestType.LOGONUSER));//Set the logon flag to true fix.Send(logon); } With a corresponding stop: void stop() { //Application Logoff QuickFix44.UserRequest logoff = new QuickFix44.UserRequest (); Set(logoff, new UserRequestType(UserRequestType.LOGOFFUSER)); fix.Send(logoff); //Fix logoff if(fix.LoggedOn) { QuickFix44.Logout fixLogout = new Logout(); fix.Send(fixLogout); } /** * This causes the thread to hang. * */ initiator.stop(); } Thanks in advance. Patrick Flannery |