treesvc: Do not provide credentials unless TLS is used
Some checks failed
ci/woodpecker/push/pre-commit Pipeline failed

4f413fe86e was perfect, except it did the opposite of what we needed.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-07-05 17:07:52 +03:00 committed by Evgenii Stratonikov
parent f354b8a270
commit 6eefe9747e

View file

@ -99,7 +99,7 @@ func dialTreeService(ctx context.Context, netmapAddr string) (*grpc.ClientConn,
), ),
} }
if netAddr.IsTLSEnabled() { if !netAddr.IsTLSEnabled() {
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
} }