private void Close() { CustomTools.Console.DebugLog("Client::Close() Close client"); CloseWebSocket(); if (SendFromThread) { sendingQueue.Clear(); } ConnectionClosed.SafeInvoke(this); }