if publicOnly is set, we should not connect user data stream

This commit is contained in:
c9s 2021-05-28 19:01:55 +08:00
parent f190b1e66a
commit 5f18b89dfa

View File

@ -519,9 +519,11 @@ func (environ *Environment) Connect(ctx context.Context) error {
return err
}
logger.Infof("connecting %s user data stream...", session.Name)
if err := session.UserDataStream.Connect(ctx); err != nil {
return err
if !session.PublicOnly {
logger.Infof("connecting %s user data stream...", session.Name)
if err := session.UserDataStream.Connect(ctx); err != nil {
return err
}
}
}