diff options
Diffstat (limited to 'TAO/tao/Reactive_Flushing_Strategy.cpp')
-rw-r--r-- | TAO/tao/Reactive_Flushing_Strategy.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/TAO/tao/Reactive_Flushing_Strategy.cpp b/TAO/tao/Reactive_Flushing_Strategy.cpp index 13060233926..9a9bb0f4954 100644 --- a/TAO/tao/Reactive_Flushing_Strategy.cpp +++ b/TAO/tao/Reactive_Flushing_Strategy.cpp @@ -6,6 +6,8 @@ #include "tao/ORB_Core.h" #include "tao/Queued_Message.h" +#include "ace/High_Res_Timer.h" + ACE_RCSID (tao, Reactive_Flushing_Strategy, "$Id$") @@ -40,6 +42,13 @@ TAO_Reactive_Flushing_Strategy::flush_message (TAO_Transport *transport, while (!msg->all_data_sent () && result >= 0) { result = orb_core->run (max_wait_time, 1); + + if (max_wait_time != 0) { + if (*max_wait_time <= ACE_Time_Value::zero) { + errno = ETIME; + result = -1; + } + } } } catch (const ::CORBA::Exception&) @@ -54,7 +63,6 @@ int TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport *transport , ACE_Time_Value *max_wait_time) { - // @@ Should we pass this down? Can we? try { TAO_ORB_Core * const orb_core = transport->orb_core (); @@ -63,6 +71,13 @@ TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport *transport { if (orb_core->run (max_wait_time, 1) == -1) return -1; + + if (max_wait_time != 0) { + if (*max_wait_time <= ACE_Time_Value::zero) { + errno = ETIME; + return -1; + } + } } } catch (const ::CORBA::Exception&) |