diff --git a/Server/Mobile.cs b/Server/Mobile.cs index e6caf1dba..d3d1c4b1d 100644 --- a/Server/Mobile.cs +++ b/Server/Mobile.cs @@ -8038,8 +8038,13 @@ namespace Server { get { - if( m_NetState != null && m_NetState.Socket == null ) - NetState = null; + if (m_NetState != null && m_NetState.Socket == null) + { + if (m_NetState.IsDisposing) + m_NetState = null; + else + NetState = null; + } return m_NetState; } diff --git a/Server/Network/NetState.cs b/Server/Network/NetState.cs index 5880b2171..d4de983ea 100644 --- a/Server/Network/NetState.cs +++ b/Server/Network/NetState.cs @@ -1114,6 +1114,8 @@ namespace Server.Network { private bool m_Disposing; + public bool IsDisposing { get { return m_Disposing; } } + public void Dispose() { Dispose( true ); }