2 #include "tao/Reactive_Connect_Strategy.h"
3 #include "tao/Connection_Handler.h"
4 #include "tao/ORB_Core.h"
6 #include "tao/Transport.h"
7 #include "tao/LF_Multi_Event.h"
9 #include "ace/Synch_Options.h"
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 TAO_Reactive_Connect_Strategy::TAO_Reactive_Connect_Strategy (
14 TAO_ORB_Core
*orb_core
)
15 : TAO_Connect_Strategy (orb_core
)
19 TAO_Reactive_Connect_Strategy::~TAO_Reactive_Connect_Strategy ()
24 TAO_Reactive_Connect_Strategy::synch_options (ACE_Time_Value
*timeout
,
25 ACE_Synch_Options
&options
)
27 if (timeout
!= nullptr)
29 options
.set (ACE_Synch_Options::USE_REACTOR
,
34 // Making it sure it is blocking.
35 options
.set (ACE_Synch_Options::USE_REACTOR
,
36 ACE_Time_Value::zero
);
41 TAO_Reactive_Connect_Strategy::wait_i (TAO_LF_Event
*ev
,
43 ACE_Time_Value
* max_wait_time
)
49 if (TAO_debug_level
> 2)
51 //FUZZ: disable check_for_lack_ACE_OS
52 TAOLIB_DEBUG ((LM_DEBUG
,
53 ACE_TEXT ("TAO (%P|%t) - Waiting in the Reactor for ")
54 ACE_TEXT ("connection completion - wait ()\n")));
55 //FUZZ: enable check_for_lack_ACE_OS
58 TAO_Leader_Follower
&leader_follower
= this->orb_core_
->leader_follower ();
62 while (ev
->keep_waiting (leader_follower
))
65 this->orb_core_
->run (max_wait_time
, 1);
67 // Did we timeout? If so, stop running the loop.
69 max_wait_time
!= nullptr &&
70 *max_wait_time
== ACE_Time_Value::zero
)
77 // Other errors? If so, stop running the loop.
82 catch (const ::CORBA::Exception
&)
88 if (result
!= -1 && ev
->error_detected (leader_follower
))
96 TAO_END_VERSIONED_NAMESPACE_DECL