mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
Minor improvements
1) gen_otp supports single use OTP secrets 2) improve database config check logic 3) reconnect websocket routine to engine (apart from the exchange pair syncer) 4) ImPrOvE CoNsIsTeNcY wItH LoG OuTpUt
This commit is contained in:
@@ -295,11 +295,21 @@ func WebsocketRoutine() {
|
||||
common.IsEnabled(Bot.Exchanges[i].IsWebsocketEnabled()))
|
||||
}
|
||||
|
||||
// TO-DO: expose IsConnected() and IsConnecting so this can be simplified
|
||||
if Bot.Exchanges[i].IsWebsocketEnabled() {
|
||||
ws, err := Bot.Exchanges[i].GetWebsocket()
|
||||
if err != nil {
|
||||
log.Errorf(log.WebsocketMgr, "Exchange %s GetWebsocket error: %s\n",
|
||||
Bot.Exchanges[i].GetName(), err)
|
||||
return
|
||||
}
|
||||
|
||||
// Exchange sync manager might have already started ws
|
||||
// service or is in the process of connecting, so check
|
||||
if ws.IsConnected() || ws.IsConnecting() {
|
||||
return
|
||||
}
|
||||
|
||||
// Data handler routine
|
||||
go WebsocketDataHandler(ws)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user