0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-09-30 14:58:59 +02:00

Fix error handling in federationsender

This commit is contained in:
Neil Alexander 2020-07-07 16:53:10 +01:00
parent 8e9580852d
commit 51fd532940

View file

@ -397,15 +397,8 @@ func (oq *destinationQueue) nextTransaction(
} }
return true, nil return true, nil
case gomatrix.HTTPError: case gomatrix.HTTPError:
// We received a HTTP error back. In this instance we only // Report that we failed to send the transaction and we
// should report an error if // will retry again, subject to backoff.
if e.Code >= 400 && e.Code <= 499 {
// We tried but the remote side has sent back a client error.
// It's no use retrying because it will happen again.
return true, nil
}
// Otherwise, report that we failed to send the transaction
// and we will retry again.
return false, err return false, err
default: default:
log.WithFields(log.Fields{ log.WithFields(log.Fields{