better logs
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 27s
Build and Publish / BuildAndDeploy (push) Successful in 2m26s

This commit is contained in:
matst80
2024-11-14 19:02:42 +01:00
parent 0fe6cb0920
commit d617fd9657

View File

@@ -29,6 +29,10 @@ func (d *DiscardedHostHandler) run() {
if host.Tries >= 0 || host.Tries < 5 {
go d.testConnection(host)
lst = append(lst, host)
} else {
if host.Tries > 0 {
log.Printf("Host %s discarded after %d tries", host.Host, host.Tries)
}
}
}
d.mu.RUnlock()
@@ -71,7 +75,7 @@ func (d *DiscardedHostHandler) SetReconnectHandler(fn func(string)) {
func (d *DiscardedHostHandler) AppendHost(host string) {
d.mu.Lock()
defer d.mu.Unlock()
log.Printf("Retrying host %s", host)
log.Printf("Adding host %s to retry list", host)
d.hosts = append(d.hosts, &DiscardedHost{
Host: host,
Tries: 0,