Update dependencies and build to go1.22 (#2113)

* Update dependencies and build to go1.22

* Fix api changes wrt to dependencies

* Update golangci config
This commit is contained in:
Wim
2024-05-23 23:44:31 +02:00
committed by GitHub
parent 56e7bd01ca
commit 2f33fe86f5
1556 changed files with 3279522 additions and 1924375 deletions

View File

@@ -24,7 +24,7 @@ type NoiseSocket struct {
writeCounter uint32
readCounter uint32
writeLock sync.Mutex
destroyed uint32
destroyed atomic.Bool
stopConsumer chan struct{}
}
@@ -75,7 +75,7 @@ func (ns *NoiseSocket) Context() context.Context {
}
func (ns *NoiseSocket) Stop(disconnect bool) {
if atomic.CompareAndSwapUint32(&ns.destroyed, 0, 1) {
if ns.destroyed.CompareAndSwap(false, true) {
close(ns.stopConsumer)
ns.fs.OnDisconnect = nil
if disconnect {