From 7951c38edc94768853a0298d8c4ef55e00d2cd7b Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 16 Mar 2021 01:31:56 +0800 Subject: [PATCH] skip connection if there is no subscription --- pkg/bbgo/environment.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/bbgo/environment.go b/pkg/bbgo/environment.go index dae4686d1..c1f83f7aa 100644 --- a/pkg/bbgo/environment.go +++ b/pkg/bbgo/environment.go @@ -476,7 +476,8 @@ func (environ *Environment) Connect(ctx context.Context) error { var logger = log.WithField("session", n) if len(session.Subscriptions) == 0 { - logger.Warnf("exchange session %s has no subscriptions", session.Name) + logger.Warnf("exchange session %s has no subscriptions, skipping", session.Name) + continue } else { // add the subscribe requests to the stream for _, s := range session.Subscriptions {