lines
This commit is contained in:
@@ -58,10 +58,10 @@ func (m *PersistentConnection) Connect() error {
|
|||||||
for {
|
for {
|
||||||
connection, err := net.Dial("tcp", m.address)
|
connection, err := net.Dial("tcp", m.address)
|
||||||
if err != nil {
|
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++
|
fails++
|
||||||
if fails > 15 {
|
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.Died <- true
|
||||||
m.Dead = true
|
m.Dead = true
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user