diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-07 12:15:43 -0330 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-07 12:15:43 -0330 |
commit | aacd45bdbdef47fabbd7c2a05e218160552f558d (patch) | |
tree | 509de13f4f94e83a2a2377bf869c6924789e2471 /cpp/src | |
parent | ICE-6352 - IceStorm: Topic creation very slow with Ice 3.6? (diff) | |
download | ice-aacd45bdbdef47fabbd7c2a05e218160552f558d.tar.bz2 ice-aacd45bdbdef47fabbd7c2a05e218160552f558d.tar.xz ice-aacd45bdbdef47fabbd7c2a05e218160552f558d.zip |
ICE-6353 - IceStorm/Freeze/BerkeleyDB: PANIC: Too many open files
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/SharedDbEnv.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IceUtil/FileUtil.cpp | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index 52f63808b1c..d467e6cae3c 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -275,13 +275,15 @@ Freeze::SharedDbEnv::removeSharedMapDb(const string& dbName) } -void Freeze::SharedDbEnv::__incRef() +void +Freeze::SharedDbEnv::__incRef() { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(refCountMutex); _refCount++; } -void Freeze::SharedDbEnv::__decRef() +void +Freeze::SharedDbEnv::__decRef() { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(refCountMutex); if(--_refCount == 0) diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp index f22fda8b7c3..d89e9e7f6a3 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/IceUtil/FileUtil.cpp @@ -498,6 +498,7 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) : IceUtilInternal::FileLock::~FileLock() { assert(_fd > -1); + ::close(_fd); unlink(_path); } |