mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 20:33:46 -07:00
da2b7586cdcb48bbdce73f507d76617fca1bc4ac
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
99.9%