private void Disconnect() { lock (this) { if (Connected) { _pluginManager.Dispose(); QueryDispatcher.Disconnect(); QueryDispatcher?.Dispose(); QueryRunner?.Dispose(); _stopwatch.Stop(); Console.WriteLine("Disconnected! Been connected for {0}:{1}:{2}.{3}", _stopwatch.Elapsed.Hours, _stopwatch.Elapsed.Minutes, _stopwatch.Elapsed.Seconds, _stopwatch.Elapsed.Milliseconds); } Connected = false; } }