diff --git a/Torch.Server/Patches/ServerResponsePatch.cs b/Torch.Server/Patches/ServerResponsePatch.cs index 9e56416..e6e45ec 100644 --- a/Torch.Server/Patches/ServerResponsePatch.cs +++ b/Torch.Server/Patches/ServerResponsePatch.cs @@ -26,10 +26,18 @@ namespace Torch.Patches // Reduce response timeout from 100 seconds to 5 seconds. foreach (var instruction in instructions) { - if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is MsilOperandInline.MsilOperandInt32 inlineI32 && inlineI32.Value == 1000) + if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is + MsilOperandInline.MsilOperandInt32 { Value: 1000 } operandResponseTimeout) { _log.Info("Patching Steam response timeout to 5 seconds"); - inlineI32.Value = 50; + operandResponseTimeout.Value = 50; + } + + if (instruction.OpCode == OpCodes.Ldc_I4 && instruction.Operand is + MsilOperandInline.MsilOperandInt32 { Value: 10000 } inlineI32) + { + _log.Info("Patching Steam connect timeout to 60 seconds"); + inlineI32.Value = 60000; } yield return instruction;