forked from jshiffer/go-xmpp

tls.Config contains fields of type sync.Once and sync.RWMutex. My understanding is that if the copy happens to occur while the lock is in a locked state, the lock will remain locked indefinitely and cause a deadlock. Instead use tls.Config.Clone() to create a shallow copy. Also the lock copy made `go vet` upset: $ go vet ./... ./xmpp.go:242:17: assignment copies lock value to newconfig: crypto/tls.Config contains sync.Once contains sync.Mutex ./xmpp.go:530:9: assignment copies lock value to *tc: crypto/tls.Config contains sync.Once contains sync.Mutex
Description
Languages
Go
100%