From 4a2716a36209823db9ea2d582f0aafc0c3c82506 Mon Sep 17 00:00:00 2001 From: Jacob Barrett Date: Tue, 23 Feb 2021 05:30:41 +0000 Subject: [PATCH] Ignore AppDomainUnloadedException --- clicache/src/impl/AppDomainContext.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clicache/src/impl/AppDomainContext.hpp b/clicache/src/impl/AppDomainContext.hpp index 0fd6581cd5..d1fc1aaf68 100644 --- a/clicache/src/impl/AppDomainContext.hpp +++ b/clicache/src/impl/AppDomainContext.hpp @@ -20,8 +20,11 @@ #include #include +#include +#include #include "../begin_native.hpp" #include +#include #include "../end_native.hpp" namespace Apache @@ -61,7 +64,11 @@ class AppDomainContext : public apache::geode::client::AppDomainContext { } void run(runnable func) { - functionPointer(func); + try { + functionPointer(func); + } catch (AppDomainUnloadedException^) { + // if AppDomain has unloaded then we are shutting down so we can ignore. + } } private: