Adjust in-process server info tls_required to tls_available

Signed-off-by: Caleb Lloyd <caleb@synadia.com>
This commit is contained in:
Caleb Lloyd
2023-07-19 16:19:09 -04:00
committed by Neil Twigg
parent ed9fafc796
commit 7993547bee

View File

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