aboutsummaryrefslogtreecommitdiff
path: root/federationapi/queue
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 /federationapi/queue
parent201ac0594336046679cf3612405e85e802a57e12 (diff)
Update dependencies (#2729)
This updates Dendrite dependencies.
Diffstat (limited to 'federationapi/queue')
-rw-r--r--federationapi/queue/destinationqueue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/federationapi/queue/destinationqueue.go b/federationapi/queue/destinationqueue.go
index 0d937ffa..5cb8cae1 100644
--- a/federationapi/queue/destinationqueue.go
+++ b/federationapi/queue/destinationqueue.go
@@ -162,7 +162,7 @@ func (oq *destinationQueue) sendEDU(event *gomatrixserverlib.EDU, receipt *share
// requests to retry.
func (oq *destinationQueue) wakeQueueIfNeeded() {
// If we are backing off then interrupt the backoff.
- if oq.backingOff.CAS(true, false) {
+ if oq.backingOff.CompareAndSwap(true, false) {
oq.interruptBackoff <- true
}
// If we aren't running then wake up the queue.
@@ -242,7 +242,7 @@ func (oq *destinationQueue) getPendingFromDatabase() {
func (oq *destinationQueue) backgroundSend() {
// Check if a worker is already running, and if it isn't, then
// mark it as started.
- if !oq.running.CAS(false, true) {
+ if !oq.running.CompareAndSwap(false, true) {
return
}
destinationQueueRunning.Inc()