From 7993547beef8ab4dda6e2ebc2aeef58350d1210d Mon Sep 17 00:00:00 2001 From: Caleb Lloyd Date: Wed, 19 Jul 2023 16:19:09 -0400 Subject: [PATCH] Adjust in-process server info tls_required to tls_available Signed-off-by: Caleb Lloyd --- server/server.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index ad42f105..5810867d 100644 --- a/server/server.go +++ b/server/server.go @@ -2617,6 +2617,13 @@ func (s *Server) createClientEx(conn net.Conn, inProcess bool) *client { info.AuthRequired = false } + // Check to see if this is an in-process connection with tls_required. + // If so, set as not required, but available. + if inProcess && info.TLSRequired { + info.TLSRequired = false + info.TLSAvailable = true + } + s.totalClients++ s.mu.Unlock() @@ -2667,7 +2674,7 @@ func (s *Server) createClientEx(conn net.Conn, inProcess bool) *client { } s.clients[c.cid] = c - tlsRequired := info.TLSRequired && !inProcess + tlsRequired := info.TLSRequired s.mu.Unlock() // Re-Grab lock