diff --git a/MistoxServer/Server/ServerConnection.cs b/MistoxServer/Server/ServerConnection.cs index 38bd741..6392baf 100644 --- a/MistoxServer/Server/ServerConnection.cs +++ b/MistoxServer/Server/ServerConnection.cs @@ -82,9 +82,11 @@ namespace Mistox.Server { } } + public IPAddress getRemote() { + return _remoteAddress.Address; + } + public void Dispose() { - if (!Connected) return; - Connected = false; _cts.Cancel(); _client.Close(); @@ -93,7 +95,6 @@ namespace Mistox.Server { _parent.Connections.TryRemove(UserName, out _); _parent.InvokeUserDisconnected(this); - _parent.Alive = false; // Remove this item from the Dictionary on the Server for garbage collection } }