mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
do not submit subscribe request if param array is empty
This commit is contained in:
parent
ded970f5a4
commit
3ea2e877ff
|
@ -155,6 +155,10 @@ func NewStream(client *binance.Client) *Stream {
|
|||
params = append(params, convertSubscription(subscription))
|
||||
}
|
||||
|
||||
if len(params) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
log.Infof("[binance] subscribing channels: %+v", params)
|
||||
err := stream.Conn.WriteJSON(StreamRequest{
|
||||
Method: "SUBSCRIBE",
|
||||
|
|
Loading…
Reference in New Issue
Block a user