mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Fix WPF RelayCommand binding issue.
This commit is contained in:
parent
62edeabc5b
commit
4578915ea8
@ -31,9 +31,20 @@ namespace Remotely.Agent.Services
|
||||
SlidingExpiration = TimeSpan.FromMinutes(10),
|
||||
RemovedCallback = new CacheEntryRemovedCallback(args =>
|
||||
{
|
||||
var chatSession = (args.CacheItem.Value as ChatSession);
|
||||
chatSession.PipeStream.Dispose();
|
||||
Process.GetProcessById(chatSession.ProcessID)?.Kill();
|
||||
try
|
||||
{
|
||||
if (args.CacheItem.Value is not ChatSession chatSession)
|
||||
{
|
||||
return;
|
||||
}
|
||||
chatSession.PipeStream.Dispose();
|
||||
var chatProcess = Process.GetProcessById(chatSession.ProcessID);
|
||||
if (chatProcess?.HasExited == false)
|
||||
{
|
||||
chatProcess.Kill();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user