diff options
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index dca96e8346e..601770612d1 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -81,6 +81,10 @@ void IceInternal::OutgoingAsync::__invoke() { _connection->sendAsyncRequest(this, _compress); + if(_connection->timeout() >= 0) + { + _absoluteTimeout = IceUtil::Time::now() + IceUtil::Time::milliSeconds(_connection->timeout()); + } } void @@ -214,6 +218,19 @@ IceInternal::OutgoingAsync::__finished(const LocalException& exc) } } +bool +IceInternal::OutgoingAsync::__timedOut() const +{ + if(_connection->timeout() >= 0) + { + return IceUtil::Time::now() >= _absoluteTimeout; + } + else + { + return false; + } +} + BasicStream* IceInternal::OutgoingAsync::__is() { |