fix: Fixes logout in new networking (#2326)

This commit is contained in:
Kamron Batman 2026-02-04 22:42:18 -08:00 committed by GitHub
parent fd2f90cba9
commit ac9d7d83ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 7 deletions

View file

@ -1245,12 +1245,7 @@ public partial class Mobile : IHued, IComparable<Mobile>, 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
{

View file

@ -182,7 +182,7 @@ public partial class NetState : IComparable<NetState>, IValueLinkListNode<NetSta
/// <summary>
/// Gets whether the socket is connected.
/// </summary>
public bool IsConnected => _running && _socket != null;
public bool IsConnected => _socket != null;
/// <summary>
/// Gets the socket handle.