diff --git a/CefSharp/Internals/MethodRunnerQueue.cs b/CefSharp/Internals/MethodRunnerQueue.cs index 3bf5dd07c..93a58935b 100644 --- a/CefSharp/Internals/MethodRunnerQueue.cs +++ b/CefSharp/Internals/MethodRunnerQueue.cs @@ -32,8 +32,18 @@ namespace CefSharp.Internals public void Enqueue(MethodInvocation methodInvocation) { + if(cancellationTokenSource.IsCancellationRequested) + { + return; + } + Task.Factory.StartNew(() => { + if (cancellationTokenSource.IsCancellationRequested) + { + return; + } + var result = ExecuteMethodInvocation(methodInvocation); var handler = MethodInvocationComplete;