Skip to content

Commit

Permalink
Ignore AppDomainUnloadedException
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-at-work committed Feb 23, 2021
1 parent edfd3a1 commit 4a2716a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clicache/src/impl/AppDomainContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@

#include <functional>
#include <vcclr.h>
#include <msclr/marshal_cppstd.h>
#include <debugapi.h>
#include "../begin_native.hpp"
#include <AppDomainContext.hpp>
#include <geode/ExceptionTypes.hpp>
#include "../end_native.hpp"

namespace Apache
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4a2716a

Please sign in to comment.