summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-08-09 11:31:28 (UTC)
committer Michael Krelin <hacker@klever.net>2007-08-09 11:31:28 (UTC)
commitccabea66fe29ae41458d47d7004d28e225caf41a (patch) (side-by-side diff)
treeeb7e6cc2afa3fffe7eafad439113ba2363a74278
parent65bab7c9f984d6fe45ce72e7db014c40eba4d240 (diff)
downloadlibopkele-ccabea66fe29ae41458d47d7004d28e225caf41a.zip
libopkele-ccabea66fe29ae41458d47d7004d28e225caf41a.tar.gz
libopkele-ccabea66fe29ae41458d47d7004d28e225caf41a.tar.bz2
fix to previous commit
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--include/opkele/types.h5
-rw-r--r--lib/consumer.cc2
2 files changed, 5 insertions, 2 deletions
diff --git a/include/opkele/types.h b/include/opkele/types.h
index 757c0af..8f4bf73 100644
--- a/include/opkele/types.h
+++ b/include/opkele/types.h
@@ -95,6 +95,11 @@ namespace opkele {
* @return true if stateless
*/
virtual bool stateless() const = 0;
+ /**
+ * check whether the association is expired.
+ * @return true if expired
+ */
+ virtual bool is_expired() const = 0;
};
/**
diff --git a/lib/consumer.cc b/lib/consumer.cc
index af309c1..8f66688 100644
--- a/lib/consumer.cc
+++ b/lib/consumer.cc
@@ -144,8 +144,6 @@ namespace opkele {
p["return_to"] = return_to;
try {
string ah = find_assoc(server)->handle();
- if(ah->is_expired()) /* TODO: or should I throw some other exception to force programmer fix his implementation? */
- throw failed_lookup(OPKELE_CP_ "find_assoc() has returned expired handle");
p["assoc_handle"] = ah;
}catch(failed_lookup& fl) {
string ah = associate(server)->handle();