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:
Rauno Ots
2020-12-29 02:10:37 +01:00
committed by GitHub
parent b95cfaccab
commit d1b206c45b
24 changed files with 75 additions and 146 deletions

View File

@@ -86,11 +86,7 @@ func (b *Binance) WsConnect() error {
go b.wsReadData()
subs, err := b.GenerateSubscriptions()
if err != nil {
return err
}
return b.Websocket.SubscribeToChannels(subs)
return nil
}
// KeepAuthKeyAlive will continuously send messages to