From ab129303874d88d4d92eee697d58d11f284bb0a8 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 25 Sep 2006 09:05:38 +0000 Subject: Fixed potential NullHandleException --- cpp/src/IceGrid/SessionI.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpp/src/IceGrid/SessionI.cpp') diff --git a/cpp/src/IceGrid/SessionI.cpp b/cpp/src/IceGrid/SessionI.cpp index f2e3dbb47ac..65ae312a1de 100644 --- a/cpp/src/IceGrid/SessionI.cpp +++ b/cpp/src/IceGrid/SessionI.cpp @@ -363,6 +363,7 @@ ClientSessionFactory::createGlacier2Session(const string& sessionId, const Glaci id.name = "Query"; ids.push_back(id); + int timeout = 0; if(ctl) { try @@ -374,9 +375,13 @@ ClientSessionFactory::createGlacier2Session(const string& sessionId, const Glaci s->destroy(); return 0; } + timeout = ctl->getSessionTimeout(); } - _reaper->add(new SessionReapable(_adapter, session, s->ice_getIdentity()), ctl->getSessionTimeout()); + if(timeout > 0) + { + _reaper->add(new SessionReapable(_adapter, session, s->ice_getIdentity()), timeout); + } return s; } -- cgit v1.2.3