mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
engine/websocket: subscribe to default channels only when actually needed (#610)
* if this is required by ws routines or sync manager * restore previous subscriptions on reconnect
This commit is contained in:
@@ -41,12 +41,8 @@ func (z *ZB) WsConnect() error {
|
||||
return err
|
||||
}
|
||||
|
||||
subs, err := z.GenerateDefaultSubscriptions()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
go z.wsReadData()
|
||||
return z.Websocket.SubscribeToChannels(subs)
|
||||
return nil
|
||||
}
|
||||
|
||||
// wsReadData handles all the websocket data coming from the websocket
|
||||
|
||||
Reference in New Issue
Block a user