mirror of
https://github.com/sartoopjj/thefeed.git
synced 2026-05-19 06:34:35 +03:00
fix: ensure resolvers have default port and update bank resolver handling
This commit is contained in:
@@ -3122,6 +3122,7 @@
|
||||
setTimeout(function () { if (item.parentNode) item.parentNode.removeChild(item) }, 2000);
|
||||
// Scan is done — load channels in case the SSE 'update' event was dropped.
|
||||
setTimeout(function () { loadChannels().then(function () { if (channels.length > 0 && selectedChannel === 0) selectChannel(1) }) }, 3000);
|
||||
refreshResolversBadge();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -1412,7 +1412,11 @@ func (s *Server) handleResolverBank(w http.ResponseWriter, r *http.Request) {
|
||||
liveStats = s.fetcher.ExportStats()
|
||||
activeSet = make(map[string]bool)
|
||||
for _, r := range s.fetcher.Resolvers() {
|
||||
activeSet[r] = true
|
||||
k := r
|
||||
if !strings.Contains(k, ":") {
|
||||
k += ":53"
|
||||
}
|
||||
activeSet[k] = true
|
||||
}
|
||||
}
|
||||
s.mu.RUnlock()
|
||||
@@ -1431,11 +1435,11 @@ func (s *Server) handleResolverBank(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var bank []bankResolver
|
||||
for _, addr := range pl.ResolverBank {
|
||||
br := bankResolver{Addr: addr, Active: activeSet[addr]}
|
||||
key := addr
|
||||
if !strings.Contains(key, ":") {
|
||||
key += ":53"
|
||||
}
|
||||
br := bankResolver{Addr: addr, Active: activeSet[key]}
|
||||
// Prefer live stats, fall back to saved scores.
|
||||
if liveStats != nil {
|
||||
if st, ok := liveStats[key]; ok {
|
||||
|
||||
Reference in New Issue
Block a user