Fix: fuck udp

This commit is contained in:
2025-10-16 08:09:19 +08:00
parent 0dea850cfa
commit e7d0f4235f
4 changed files with 29 additions and 58 deletions

View File

@@ -116,12 +116,7 @@ type clientScanMsg time.Time
func (m *LobbyModel) clientScan() tea.Cmd {
return tea.Tick(REFRESH_TIME, func(t time.Time) tea.Msg {
m.endpoints = []string{}
for _, endpoint := range viper.GetStringSlice("udp-endpoints") {
if err := utils.Ping(endpoint); err == nil {
m.endpoints = append(m.endpoints, endpoint)
}
}
m.endpoints, m.err = utils.Ping(viper.GetStringSlice("udp-endpoints"))
return clientScanMsg(t)
})
}