hotfix: connection refused showing as valid

This commit is contained in:
Muhammad Nauman Raza 2024-12-13 15:03:01 +00:00
parent b887c6e618
commit 223a10bf9b
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -54,7 +54,7 @@ func (m model) Update(message tea.Msg) (tea.Model, tea.Cmd) {
cmd := exec.Command("nc", "-zv", "devraza.giize.com", i, "-w", "1")
out, _ := cmd.CombinedOutput()
if len(strings.Split(string(out), " ")) < 12 {
if len(strings.Split(string(out), " ")) == 8 {
m.outputs = append(m.outputs, 1)
} else {
m.outputs = append(m.outputs, 0)