From 4bcbf313f271048f8f300f5638e52d66c2ff5fad Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Wed, 27 Jan 2021 16:50:40 -0800 Subject: [PATCH] storage/raft: Fix panic when no Join TLS info is being used --- physical/raft/raft.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physical/raft/raft.go b/physical/raft/raft.go index e383be7c9ba5..5481552e3226 100644 --- a/physical/raft/raft.go +++ b/physical/raft/raft.go @@ -230,7 +230,9 @@ func parseTLSInfo(leaderInfo *LeaderJoinInfo) (*tls.Config, error) { return nil, err } } - tlsConfig.ServerName = leaderInfo.LeaderTLSServerName + if tlsConfig != nil { + tlsConfig.ServerName = leaderInfo.LeaderTLSServerName + } return tlsConfig, nil }