mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-18 15:50:52 +01:00
Fix error handling in federationsender
This commit is contained in:
parent
8e9580852d
commit
51fd532940
1 changed files with 2 additions and 9 deletions
|
@ -397,15 +397,8 @@ func (oq *destinationQueue) nextTransaction(
|
|||
}
|
||||
return true, nil
|
||||
case gomatrix.HTTPError:
|
||||
// We received a HTTP error back. In this instance we only
|
||||
// should report an error if
|
||||
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.
|
||||
// Report that we failed to send the transaction and we
|
||||
// will retry again, subject to backoff.
|
||||
return false, err
|
||||
default:
|
||||
log.WithFields(log.Fields{
|
||||
|
|
Loading…
Reference in a new issue