fix(core): Fixes a few netstate issues (#436)

- [X] Fixes the order of disconnect/dispose
- [X] Removes IsDisposing
This commit is contained in:
Kamron Batman 2021-02-01 20:37:51 -08:00 • committed by GitHub
parent f147cb119f
commit c6e93a6814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 29 deletions

View file

@ -1445,7 +1445,15 @@ namespace Server
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Owner)]
public NetState NetState
{
get => m_NetState?.Connection != null && !m_NetState.IsDisposing ? m_NetState : null;
get
{
if (m_NetState?.Connection == null)
{
m_NetState = null;
}
return m_NetState;
}
set
{
if (m_NetState != value)