From 2b4c81888362e485b20da8813773dc358da5c6fa Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 4 Apr 2018 23:22:22 +0900 Subject: [PATCH] ing --- fasthttp/websocket/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fasthttp/websocket/client.go b/fasthttp/websocket/client.go index e6e2fe4..6895734 100644 --- a/fasthttp/websocket/client.go +++ b/fasthttp/websocket/client.go @@ -135,14 +135,20 @@ RC_LOOP: continue RC_LOOP } + logging.Logger().Debugf("connection lost") + for indexI := 0; indexI < c.ReconnectTryTime; indexI++ { + logging.Logger().Debugf("trying reconnect[%d]", indexI) + conn, _, err := c.connect() if nil == err { + logging.Logger().Debugf("reconnected") c.reconnectedChan <- conn continue RC_LOOP } time.Sleep(c.ReconnectInterval) } + logging.Logger().Debugf("reconnecting has been failed") } }