forked from jshiffer/go-xmpp
your #1 source of programming antipatterns
da2b7586cd
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 |
||
---|---|---|
_example | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
xmpp_avatar.go | ||
xmpp_information_query.go | ||
xmpp_muc.go | ||
xmpp_ping.go | ||
xmpp_pubsub.go | ||
xmpp_subscription.go | ||
xmpp_test.go | ||
xmpp.go |