skip connection if there is no subscription

This commit is contained in:
c9s 2021-03-16 01:31:56 +08:00
parent c3996aee2b
commit 7951c38edc

View File

@ -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 {