diff options
author | Michi Henning <michi@zeroc.com> | 2003-07-18 05:38:56 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-07-18 05:38:56 +0000 |
commit | 9a7252044516af5435ca202657dd7465056b74a8 (patch) | |
tree | 78ab9df8f1682fd8c22e389d8825c6dacb440eeb /cpp/src/Ice/ThreadPool.cpp | |
parent | Snap-shot check-in. (diff) | |
download | ice-9a7252044516af5435ca202657dd7465056b74a8.tar.bz2 ice-9a7252044516af5435ca202657dd7465056b74a8.tar.xz ice-9a7252044516af5435ca202657dd7465056b74a8.zip |
Merging changes for DatagramLimitException
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 69fa4892a50..f14a4986fa4 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -39,6 +39,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p _size(0), _sizeMax(0), _sizeWarn(0), + _messageSizeMax(0), _running(0), _inUse(0), _load(0) @@ -71,6 +72,8 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p int sizeWarn = _instance->properties()->getPropertyAsIntWithDefault(_prefix + ".SizeWarn", _sizeMax * 80 / 100); const_cast<int&>(_sizeWarn) = sizeWarn; + const_cast<int&>(_messageSizeMax) = instance->messageSizeMax(); + __setNoDelete(true); try { @@ -539,6 +542,10 @@ IceInternal::ThreadPool::run() { continue; } + catch(const DatagramLimitException&) // Expected. + { + continue; + } catch(const LocalException& ex) { handler->exception(ex); @@ -683,7 +690,7 @@ IceInternal::ThreadPool::read(const EventHandlerPtr& handler) { throw IllegalMessageSizeException(__FILE__, __LINE__); } - if(size > 1024 * 1024) // TODO: configurable + if(size > _messageSizeMax) { throw MemoryLimitException(__FILE__, __LINE__); } |