Fix: fuck udp
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user