summaryrefslogtreecommitdiff
path: root/TAO/tao/Connection_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Connection_Handler.cpp')
-rw-r--r--TAO/tao/Connection_Handler.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp
index d0f9cebefcb..ff9fbfb745a 100644
--- a/TAO/tao/Connection_Handler.cpp
+++ b/TAO/tao/Connection_Handler.cpp
@@ -5,7 +5,6 @@
#include "tao/ORB_Core.h"
#include "tao/debug.h"
#include "tao/Resume_Handle.h"
-#include "tao/Resume_Handle_Deferred.h"
#include "tao/Transport.h"
#include "tao/Wait_Strategy.h"
@@ -214,8 +213,6 @@ TAO_Connection_Handler::handle_input_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
// If we can't process upcalls just return
if (!this->transport ()->wait_strategy ()->can_process_upcalls ())
{
- ACE_Time_Value suspend_delay (0, 2000);
-
if (TAO_debug_level > 6)
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Connection_Handler[%d]::handle_input_eh, "
@@ -223,33 +220,17 @@ TAO_Connection_Handler::handle_input_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
"because upcalls temporarily suspended on this thread\n",
this->transport()->id()));
- if (TAO_debug_level > 5)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::handle_input_eh, "
- "scheduled to resume in %#T sec\n",
- eh->get_handle(),
- &suspend_delay));
-
- // Using the heap to create the timeout handler, since we do not know
- // which handle we will have to try to resume.
- TAO_Resume_Handle_Deferred* prhd = 0;
- ACE_NEW_RETURN (prhd,
- TAO_Resume_Handle_Deferred (this->orb_core_, eh),
- -1);
- ACE_Event_Handler_var safe_handler (prhd);
-
- int const retval = this->orb_core_->reactor()->schedule_timer (prhd, 0, suspend_delay);
- if (retval == -1)
+ // defer upcall at leader_follower
+ if (this->transport ()->wait_strategy ()->defer_upcall (eh) != 0)
{
if (TAO_debug_level > 5)
ACE_ERROR ((LM_ERROR,
"TAO (%P|%t) - Connection_Handler[%d]::handle_input_eh, "
- "Error scheduling timer in %#T sec\n",
- eh->get_handle(),
- &suspend_delay));
+ "Error deferring upcall handler[%d]\n",
+ this->transport ()->id (),
+ eh->get_handle ()));
return -1;
}
-
// Returning 0 causes the wait strategy to exit and the leader thread
// to enter the reactor's select() call.
return 0;