From ba7ed276e693287c770eb467358ad977b0a115be Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:53:04 +0700 Subject: [PATCH] also increase steam connect timeout --- Torch.Server/Patches/ServerResponsePatch.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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;