diff --git a/src/Tgstation.Server.Host/System/ProcessExecutor.cs b/src/Tgstation.Server.Host/System/ProcessExecutor.cs index 0512cb9a46..8c9f98bd65 100644 --- a/src/Tgstation.Server.Host/System/ProcessExecutor.cs +++ b/src/Tgstation.Server.Host/System/ProcessExecutor.cs @@ -195,8 +195,9 @@ namespace Tgstation.Server.Host.System var pid = handle.Id; logger.LogTrace("Starting read for PID {pid}...", pid); - var stdOutHandle = handle.StandardOutput; - var stdErrHandle = handle.StandardError; + // once we obtain these handles we're responsible for them + using var stdOutHandle = handle.StandardOutput; + using var stdErrHandle = handle.StandardError; Task outputReadTask = null, errorReadTask = null; bool outputOpen = true, errorOpen = true; async Task GetNextLine()