diff options
| author | Dan Engelbrecht <[email protected]> | 2024-06-13 15:36:02 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-06-13 15:36:02 +0200 |
| commit | 1a09d7b5e6bc652e9ea0e826b8f77d3e4cc3f4cd (patch) | |
| tree | 3973551b906a1296a586496217cd4382ef1f1b13 | |
| parent | 5.5.3-pre2 (diff) | |
| download | zen-1a09d7b5e6bc652e9ea0e826b8f77d3e4cc3f4cd.tar.xz zen-1a09d7b5e6bc652e9ea0e826b8f77d3e4cc3f4cd.zip | |
Skip open process handle caching if we don't have a session id (#94)
* Don't try to cache process handle if we don't have a session id
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenutil/openprocesscache.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 38024fed0..d5cbfd5d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,7 @@ - Improvement: Add batch fetch of cache values in the GetCacheValues request - Improvement: Use a smaller thread pool for network operations when doing oplog import to reduce risk of NIC/router failure - Improvement: Medium worker pool now uses a minimum of 2 threads (up from 1) +- Improvement: Don't try to cache process handles on Windows if we don't have a session id - ## 5.5.2 - Bugfix: Don't try to read bytes to validate a compact binary object that is empty diff --git a/src/zenutil/openprocesscache.cpp b/src/zenutil/openprocesscache.cpp index fb654bde2..256d5fb4a 100644 --- a/src/zenutil/openprocesscache.cpp +++ b/src/zenutil/openprocesscache.cpp @@ -56,6 +56,10 @@ OpenProcessCache::GetProcessHandle(Oid SessionId, int ProcessPid) { return nullptr; } + if (SessionId == Oid::Zero) + { + return nullptr; + } #if ZEN_PLATFORM_WINDOWS ZEN_ASSERT(ProcessPid != 0); { |