diff --git a/src/Plugins/BotSharp.Plugin.PythonInterpreter/PythonInterpreterPlugin.cs b/src/Plugins/BotSharp.Plugin.PythonInterpreter/PythonInterpreterPlugin.cs index 303ae41a7..bee046e51 100644 --- a/src/Plugins/BotSharp.Plugin.PythonInterpreter/PythonInterpreterPlugin.cs +++ b/src/Plugins/BotSharp.Plugin.PythonInterpreter/PythonInterpreterPlugin.cs @@ -39,16 +39,12 @@ public void Configure(IApplicationBuilder app) { Runtime.PythonDLL = pyLoc; PythonEngine.Initialize(); -#if DEBUG _pyState = PythonEngine.BeginAllowThreads(); -#endif lifetime.ApplicationStopping.Register(() => { try { -#if DEBUG PythonEngine.EndAllowThreads(_pyState); -#endif PythonEngine.Shutdown(); } catch { }