summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-04-10 01:01:00 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-04-10 01:01:00 +0000
commit32590e2d6fc26204e2d88e6393095e4097e62fcc (patch)
treef29eadc77db7d97654d1c68a370ac8119f962fc0
parentea4e345739e04d4b5c8a18d31e41bd0b2c9da78f (diff)
downloadATCD-32590e2d6fc26204e2d88e6393095e4097e62fcc.tar.gz
Wed Apr 10 00:58:56 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r--TAO/ChangeLog_Asynch_ImR8
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp13
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/LiveCheck.h2
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 <mesnier_p@ociweb.com>
+
+ * 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 <mesnier_p@ociweb.com>
* 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<void *>(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);