mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 20:47:28 +01:00
Remove SafeHandle as referencing it does nothing
This commit is contained in:
@@ -42,12 +42,6 @@ namespace Tgstation.Server.Host.System
|
||||
/// </summary>
|
||||
readonly CancellationTokenSource readerCts;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="global::System.Diagnostics.Process.SafeHandle"/>.
|
||||
/// </summary>
|
||||
/// <remarks>We keep this to prevent .NET from closing the real handle too soon. See https://stackoverflow.com/a/47656845</remarks>
|
||||
readonly SafeProcessHandle safeHandle;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Task{TResult}"/> resulting in the process' standard output/error text.
|
||||
/// </summary>
|
||||
@@ -75,7 +69,6 @@ namespace Tgstation.Server.Host.System
|
||||
this.handle = handle ?? throw new ArgumentNullException(nameof(handle));
|
||||
|
||||
// Do this fast because the runtime will bitch if we try to access it after it ends
|
||||
safeHandle = handle.SafeHandle;
|
||||
Id = handle.Id;
|
||||
|
||||
this.readerCts = readerCts;
|
||||
@@ -122,7 +115,6 @@ namespace Tgstation.Server.Host.System
|
||||
if (readTask != null)
|
||||
await readTask;
|
||||
|
||||
safeHandle.Dispose();
|
||||
handle.Dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user