From 7da34add1f31c1221afd1e58f2a0cda45654d437 Mon Sep 17 00:00:00 2001 From: Apoorv Deshmukh Date: Thu, 31 Aug 2023 20:12:15 +0530 Subject: [PATCH] Correct transport check --- tds.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds.go b/tds.go index dd6be6b5..5142df10 100644 --- a/tds.go +++ b/tds.go @@ -1240,7 +1240,7 @@ initiate_connection: } //We need not perform TLS handshake if the communication channel is already encrypted (encrypt=strict) - if isTransportEncrypted { + if !isTransportEncrypted { if encrypt != encryptNotSup { var config *tls.Config if pc := p.TLSConfig; pc != nil {