Steven Santos Erenst da2b7586cd
Avoid creating copies of locks (#121)
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
2021-01-21 17:25:57 +09:00
2016-11-21 10:25:22 +09:00
2011-02-28 11:46:55 +09:00
2017-09-13 22:09:24 +02:00
2018-05-05 20:33:05 +09:00
2016-09-08 20:56:40 +05:00
2015-09-17 10:43:05 -07:00
2017-11-03 13:12:33 +01:00
2021-01-21 17:25:57 +09:00

go-xmpp

go xmpp library (original was written by russ cox )

Documentation

Description
your #1 source of programming antipatterns
Readme 1.2 MiB
Languages
Go 100%