public void Close() { if (!Closing && !Closed) { Closing = true; clientBuffer.Release(); _connection.Close(); Closing = false; Closed = true; } }