aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-09-20 15:01:19 +0100
committerGitHub <noreply@github.com>2022-09-20 15:01:19 +0100
commitbd39748b5c8b1890950db100382d3b128d333222 (patch)
tree7236946f5c7cd87f5a01c68f6f9a45df4b731b92 /setup
parent201ac0594336046679cf3612405e85e802a57e12 (diff)
Update dependencies (#2729)
This updates Dendrite dependencies.
Diffstat (limited to 'setup')
-rw-r--r--setup/base/base.go4
-rw-r--r--setup/process/process.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/setup/base/base.go b/setup/base/base.go
index 3070bed5..0a34523e 100644
--- a/setup/base/base.go
+++ b/setup/base/base.go
@@ -498,7 +498,7 @@ func (b *BaseDendrite) SetupAndServeHTTP(
logrus.Infof("Starting internal %s listener on %s", b.componentName, internalServ.Addr)
b.ProcessContext.ComponentStarted()
internalServ.RegisterOnShutdown(func() {
- if internalShutdown.CAS(false, true) {
+ if internalShutdown.CompareAndSwap(false, true) {
b.ProcessContext.ComponentFinished()
logrus.Infof("Stopped internal HTTP listener")
}
@@ -526,7 +526,7 @@ func (b *BaseDendrite) SetupAndServeHTTP(
logrus.Infof("Starting external %s listener on %s", b.componentName, externalServ.Addr)
b.ProcessContext.ComponentStarted()
externalServ.RegisterOnShutdown(func() {
- if externalShutdown.CAS(false, true) {
+ if externalShutdown.CompareAndSwap(false, true) {
b.ProcessContext.ComponentFinished()
logrus.Infof("Stopped external HTTP listener")
}
diff --git a/setup/process/process.go b/setup/process/process.go
index 01eb26e2..06ef6021 100644
--- a/setup/process/process.go
+++ b/setup/process/process.go
@@ -51,7 +51,7 @@ func (b *ProcessContext) WaitForComponentsToFinish() {
}
func (b *ProcessContext) Degraded() {
- if b.degraded.CAS(false, true) {
+ if b.degraded.CompareAndSwap(false, true) {
logrus.Warn("Dendrite is running in a degraded state")
sentry.CaptureException(fmt.Errorf("Process is running in a degraded state"))
}