<commit_before>package dochaincore

import (
	"fmt"
	"net"
	"strings"
	"time"
)

func waitForPort(host string, port int) error {
	for attempt := uint(0); attempt < 15; attempt++ {
		conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", host, port))
		if err != nil && strings.Contains(strings.ToLower(err.Error()), "refused") {
			time.Sleep(5 * time.Second)
			continue
		} else if err != nil {
			return err
		}
		conn.Close()
		return nil
	}
	return fmt.Errorf("timed out waiting for port %d to open", port)
}<commit_msg>just wait regardless of error<commit_after>package dochaincore

import (
	"fmt"
	"net"
	"time"
)

func waitForPort(host string, port int) error {
	for attempt := uint(0); attempt < 15; attempt++ {
		conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", host, port))
		if err != nil {
			time.Sleep(5 * time.Second)
			continue
		} else if err != nil {
			return err
		}
		conn.Close()
		return nil
	}
	return fmt.Errorf("timed out waiting for port %d to open", port)
}
{'fraction_non_alphanumeric': 0.1565040650406504, 'fraction_numerical': 0.008130081300813009, 'mean_word_length': 3.6682464454976302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6040134', 'n_tokens_mistral': 382, 'n_tokens_neox': 350, 'n_words': 105}