summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Connection.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-02-26 16:49:44 +0000
committerMarc Laukien <marc@zeroc.com>2004-02-26 16:49:44 +0000
commit0e1949a9490c6bc6f5839051c435de209ae53c7a (patch)
tree5f162e0edc26c59bb41bf014ce1992ad5ff15c66 /cpp/src/Ice/Connection.cpp
parentfixes (diff)
downloadice-0e1949a9490c6bc6f5839051c435de209ae53c7a.tar.bz2
ice-0e1949a9490c6bc6f5839051c435de209ae53c7a.tar.xz
ice-0e1949a9490c6bc6f5839051c435de209ae53c7a.zip
fix
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r--cpp/src/Ice/Connection.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp
index 38fd60820fb..4630e41787c 100644
--- a/cpp/src/Ice/Connection.cpp
+++ b/cpp/src/Ice/Connection.cpp
@@ -330,7 +330,7 @@ IceInternal::Connection::monitor()
//
for(map<Int, AsyncRequest>::iterator p = _asyncRequests.begin(); p != _asyncRequests.end(); ++p)
{
- if(p->second.t > IceUtil::Time() && p->second.t < IceUtil::Time::now())
+ if(p->second.t > IceUtil::Time() && p->second.t <= IceUtil::Time::now())
{
setState(StateClosed, TimeoutException(__FILE__, __LINE__));
return;
@@ -567,7 +567,10 @@ IceInternal::Connection::sendAsyncRequest(BasicStream* os, const OutgoingAsyncPt
//
struct AsyncRequest asyncRequest;
asyncRequest.p = out;
- asyncRequest.t = IceUtil::Time::now() + IceUtil::Time::milliSeconds(_endpoint->timeout());
+ if(_endpoint->timeout() > 0)
+ {
+ asyncRequest.t = IceUtil::Time::now() + IceUtil::Time::milliSeconds(_endpoint->timeout());
+ }
_asyncRequestsHint = _asyncRequests.insert(_asyncRequests.end(),
pair<const Int, AsyncRequest>(requestId, asyncRequest));