lines
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 27s
Build and Publish / BuildAndDeploy (push) Successful in 2m20s

This commit is contained in:
matst80
2024-11-13 10:48:22 +01:00
parent 6e00bd7472
commit fdded53ea8

View File

@@ -58,10 +58,10 @@ func (m *PersistentConnection) Connect() error {
for {
connection, err := net.Dial("tcp", m.address)
if err != nil {
log.Printf("Can't connect to %s: %v\n, count: %d", m.address, err, fails)
log.Printf("Can't connect to %s: %v, count: %d", m.address, err, fails)
fails++
if fails > 15 {
log.Printf("Too many connection failures, closing connection to %s\n", m.address)
log.Printf("Too many connection failures, closing connection to %s", m.address)
m.Died <- true
m.Dead = true
return err