You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
stop retrying to send event if we get M_TOO_LARGE
This commit is contained in:
@@ -156,6 +156,11 @@ MatrixScheduler.RETRY_BACKOFF_RATELIMIT = function(event, attempts, err) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if event that we are trying to send is too large in any way then retrying won't help
|
||||||
|
if (err.name === "M_TOO_LARGE") {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (err.name === "M_LIMIT_EXCEEDED") {
|
if (err.name === "M_LIMIT_EXCEEDED") {
|
||||||
const waitTime = err.data.retry_after_ms;
|
const waitTime = err.data.retry_after_ms;
|
||||||
if (waitTime) {
|
if (waitTime) {
|
||||||
|
|||||||
Reference in New Issue
Block a user