Skip to content

Commit e81fdc9

Browse files
committed
[F] Prevent checkAuth multiple calls
1 parent d96f465 commit e81fdc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mod/WorldLink/FutariPatch.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public static class Futari
3434

3535
private static readonly Dictionary<NFSocket, FutariSocket> redirect = new();
3636
private static FutariClient client;
37+
private static bool checkAuthCalled = false;
3738
private static bool isInit = false;
3839
public static bool stopping = false;
3940

@@ -78,6 +79,10 @@ public static void OnBeforePatch()
7879
[HarmonyPatch(typeof(OperationManager), "CheckAuth_Proc")]
7980
public static bool CheckAuth_Proc()
8081
{
82+
// Prevent multiple calls
83+
if (checkAuthCalled) return PrefixRet.RUN_ORIGINAL;
84+
checkAuthCalled = true;
85+
8186
if (isInit) return PrefixRet.RUN_ORIGINAL;
8287
Log.Info("CheckAuth_Proc");
8388

0 commit comments

Comments
 (0)