From ac9d7d83fff6ee282ffb43a3a03d93b42f674675 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Wed, 4 Feb 2026 22:42:18 -0800 Subject: [PATCH] fix: Fixes logout in new networking (#2326) --- Projects/Server/Mobiles/Mobile.cs | 7 +------ Projects/Server/Network/NetState/NetState.cs | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index 56223aaf0..94234ebff 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -1245,12 +1245,7 @@ public partial class Mobile : IHued, IComparable, ISpawnable, IObjectPro { get { - if (m_NetState is not { IsConnected: true }) - { - m_NetState = null; - } - - return m_NetState; + return m_NetState is { IsConnected: true } ? m_NetState : null; } set { diff --git a/Projects/Server/Network/NetState/NetState.cs b/Projects/Server/Network/NetState/NetState.cs index 57ab6b4c4..36a116142 100755 --- a/Projects/Server/Network/NetState/NetState.cs +++ b/Projects/Server/Network/NetState/NetState.cs @@ -182,7 +182,7 @@ public partial class NetState : IComparable, IValueLinkListNode /// Gets whether the socket is connected. /// - public bool IsConnected => _running && _socket != null; + public bool IsConnected => _socket != null; /// /// Gets the socket handle.