This commit is contained in:
crusader 2018-04-04 23:22:22 +09:00
parent 33c01a5e3c
commit 2b4c818883

View File

@ -135,14 +135,20 @@ RC_LOOP:
continue RC_LOOP continue RC_LOOP
} }
logging.Logger().Debugf("connection lost")
for indexI := 0; indexI < c.ReconnectTryTime; indexI++ { for indexI := 0; indexI < c.ReconnectTryTime; indexI++ {
logging.Logger().Debugf("trying reconnect[%d]", indexI)
conn, _, err := c.connect() conn, _, err := c.connect()
if nil == err { if nil == err {
logging.Logger().Debugf("reconnected")
c.reconnectedChan <- conn c.reconnectedChan <- conn
continue RC_LOOP continue RC_LOOP
} }
time.Sleep(c.ReconnectInterval) time.Sleep(c.ReconnectInterval)
} }
logging.Logger().Debugf("reconnecting has been failed")
} }
} }