internal void DisposeConnection() { if (IsDisposed) return; IsDisposed = true; if (socket == null) return; try { Quit(); } catch (Exception ex) { log.Error("Error when trying to Quit()", ex); } finally { SafeConnectionClose(); } }