From 32590e2d6fc26204e2d88e6393095e4097e62fcc Mon Sep 17 00:00:00 2001 From: Phil Mesnier Date: Wed, 10 Apr 2013 01:01:00 +0000 Subject: Wed Apr 10 00:58:56 UTC 2013 Phil Mesnier --- TAO/ChangeLog_Asynch_ImR | 8 ++++++++ TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp | 13 ++++++------- TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/TAO/ChangeLog_Asynch_ImR b/TAO/ChangeLog_Asynch_ImR index 3537b84af7d..7f54c39bb62 100644 --- a/TAO/ChangeLog_Asynch_ImR +++ b/TAO/ChangeLog_Asynch_ImR @@ -1,3 +1,11 @@ +Wed Apr 10 00:58:56 UTC 2013 Phil Mesnier + + * orbsvcs/ImplRepo_Service/LiveCheck.h: + * orbsvcs/ImplRepo_Service/LiveCheck.cpp: + + Fix for the reconnect test. Use the fact that a dead server is + not scheduled for a ping to throw an immediate exception. + Tue Apr 9 15:44:55 UTC 2013 Phil Mesnier * orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp: diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index 609c7090dd9..397db0f27ae 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -488,8 +488,7 @@ LiveCheck::add_poll_listener (LiveListener *l) entry->add_listener (l); entry->reset_status (); - this->schedule_ping (entry); - return true; + return this->schedule_ping (entry); } bool @@ -507,20 +506,19 @@ LiveCheck::add_listener (LiveListener *l) } entry->add_listener (l); - this->schedule_ping (entry); - return true; + return this->schedule_ping (entry); } -void +bool LiveCheck::schedule_ping (LiveEntry *entry) { if (!this->running_) - return; + return false; LiveStatus status = entry->status(); if (status == LS_PING_AWAY || status == LS_DEAD) { - return; + return status != LS_DEAD; } ACE_Time_Value now (ACE_High_Res_Timer::gettimeofday_hr()); @@ -539,6 +537,7 @@ LiveCheck::schedule_ping (LiveEntry *entry) reinterpret_cast(this->token_), delay); } + return true; } LiveStatus diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h index 798ecbdcc5c..b3b643e5363 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h @@ -188,7 +188,7 @@ class Locator_Export LiveCheck : public ACE_Event_Handler bool add_per_client_listener (LiveListener *listener, ImplementationRepository::ServerObject_ptr ref); - void schedule_ping (LiveEntry *entry); + bool schedule_ping (LiveEntry *entry); LiveStatus is_alive (const char *server); -- cgit v1.2.1