correct app close

fix publishing
This commit is contained in:
Alex Bezdieniezhnykh
2025-03-03 19:37:07 +02:00
parent f108cca5f5
commit a493606f64
6 changed files with 43 additions and 21 deletions
@@ -71,8 +71,11 @@ public class PythonResourceLoader : IResourceLoader, IAuthProvider
public void StopPython()
{
_dealer.SendFrame(MessagePackSerializer.Serialize(new RemoteCommand(CommandType.Exit)));
_dealer.Close();
if (!_dealer.IsDisposed)
{
_dealer.SendFrame(MessagePackSerializer.Serialize(new RemoteCommand(CommandType.Exit)));
_dealer.Close();
}
}
public MemoryStream LoadFileFromPython(string fileName, string? folder = null)