summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/libmdbx/src/src/lck-windows.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/libmdbx/src/src/lck-windows.c b/libs/libmdbx/src/src/lck-windows.c
index ab3fae57f8..327979e653 100644
--- a/libs/libmdbx/src/src/lck-windows.c
+++ b/libs/libmdbx/src/src/lck-windows.c
@@ -253,7 +253,8 @@ int mdbx_suspend_threads_before_remap(MDBX_env *env,
} else {
/* Without LCK (i.e. read-only mode).
* Walk thougth a snapshot of all running threads */
- mdbx_assert(env, env->me_txn0 == NULL);
+ mdbx_assert(env,
+ env->me_txn0 == NULL || (env->me_flags & MDBX_EXCLUSIVE) != 0);
const HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (hSnapshot == INVALID_HANDLE_VALUE)
return GetLastError();