mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Make scripting services transient.
This commit is contained in:
parent
b69cb6a5c8
commit
32b0d41b68
@ -47,10 +47,10 @@ namespace Remotely.Agent
|
||||
});
|
||||
serviceCollection.AddSingleton<DeviceSocket>();
|
||||
serviceCollection.AddScoped<ChatClientService>();
|
||||
serviceCollection.AddScoped<Bash>();
|
||||
serviceCollection.AddScoped<CMD>();
|
||||
serviceCollection.AddScoped<PSCore>();
|
||||
serviceCollection.AddScoped<WindowsPS>();
|
||||
serviceCollection.AddTransient<Bash>();
|
||||
serviceCollection.AddTransient<CMD>();
|
||||
serviceCollection.AddTransient<PSCore>();
|
||||
serviceCollection.AddTransient<WindowsPS>();
|
||||
serviceCollection.AddScoped<ConfigService>();
|
||||
serviceCollection.AddScoped<Logger>();
|
||||
serviceCollection.AddScoped<Updater>();
|
||||
|
||||
@ -92,8 +92,8 @@ namespace Remotely.Agent.Services
|
||||
|
||||
private void ProcessIdleTimeout_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
PS?.Dispose();
|
||||
Sessions.TryRemove(ConnectionID, out _);
|
||||
PS?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user