Since the tls.Config is an option in the nsq.Config, you can't be certain it isn't already being used, and therefore synchronization of the Once/Mutex are lost in the copied value. Depending on the minimum Go version this package supports, the solution might be as simple as Cloning the tls.Config with the provided method added in Go1.8 https://golang.org/pkg/crypto/tls/#Config.Clone
While there are some minor linting issues, I noticed go-vet pointing out
Here: https://github.com/nsqio/go-nsq/blob/61f49c096d0d767be61e4de06f724e1cb5fd85d7/conn.go#L390
Since the tls.Config is an option in the nsq.Config, you can't be certain it isn't already being used, and therefore synchronization of the Once/Mutex are lost in the copied value. Depending on the minimum Go version this package supports, the solution might be as simple as Cloning the tls.Config with the provided method added in Go1.8 https://golang.org/pkg/crypto/tls/#Config.Clone