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

@@ -95,15 +95,6 @@ func (b *Bitmex) WsConnect() error {
}
go b.wsReadData()
subs, err := b.GenerateDefaultSubscriptions()
if err != nil {
return err
}
err = b.Websocket.SubscribeToChannels(subs)
if err != nil {
return err
}
err = b.websocketSendAuth()
if err != nil {