修复多次触发Socket广播的问题

This commit is contained in:
Mili 2023-03-11 21:46:34 +08:00
parent 59d70fb3a0
commit 42bd8b18a9

View File

@ -154,6 +154,7 @@ namespace Milimoe.FunGame.Desktop.UI
SetServerStatusLight((int)LightType.Red); SetServerStatusLight((int)LightType.Red);
SetButtonEnableIfLogon(false, ClientState.WaitConnect); SetButtonEnableIfLogon(false, ClientState.WaitConnect);
LogoutAccount(); LogoutAccount();
MainController?.Dispose();
CloseConnectedWindows(); CloseConnectedWindows();
break; break;
@ -166,6 +167,7 @@ namespace Milimoe.FunGame.Desktop.UI
SetServerStatusLight((int)LightType.Yellow); SetServerStatusLight((int)LightType.Yellow);
SetButtonEnableIfLogon(false, ClientState.WaitConnect); SetButtonEnableIfLogon(false, ClientState.WaitConnect);
LogoutAccount(); LogoutAccount();
MainController?.Dispose();
break; break;
case MainInvokeType.LogIn: case MainInvokeType.LogIn: