public void Dispose() { this.cleanupTimer.Dispose(); foreach (var connection in this.connectionCache.Values) { try { // Close connection.Close(); } catch { } } this.listenSocket?.Dispose(); this.listenSocket = null; }