mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Avoid loops by setting end to an empty string if start == end (#3146)
This commit is contained in:
parent
b965a08faa
commit
69b2069dea
1 changed files with 6 additions and 0 deletions
|
@ -250,6 +250,12 @@ func OnIncomingMessagesRequest(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If start and end are equal, we either reached the beginning or something else
|
||||||
|
// is wrong. To avoid endless loops from clients, set end to 0 an empty string
|
||||||
|
if start == end {
|
||||||
|
end = types.TopologyToken{}
|
||||||
|
}
|
||||||
|
|
||||||
util.GetLogger(req.Context()).WithFields(logrus.Fields{
|
util.GetLogger(req.Context()).WithFields(logrus.Fields{
|
||||||
"from": from.String(),
|
"from": from.String(),
|
||||||
"to": to.String(),
|
"to": to.String(),
|
||||||
|
|
Loading…
Reference in a new issue