Fix WS reconnect ticker
func (w *WebsocketClient) connectWebsocket() {
var err error
url := fmt.Sprintf("wss://%s%s", w.host, w.stream)
logger.Debug("Start connecting %s...", url)
w.conn, _, err = websocket.DefaultDialer.Dial(url, nil)
if err != nil {
logger.Error("Websocket connection error: %s", err.Error())
return
}
logger.Info("%s connected", url)
w.lastReceivedTime = time.Now()
w.establishmentTime = time.Now()
w.startReadLoop()
if w.connectedHandler != nil {
w.connectedHandler()
}
}