aboutsummaryrefslogtreecommitdiff
path: root/syncapi
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi')
-rw-r--r--syncapi/routing/messages.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go
index 937e20ad..c3871618 100644
--- a/syncapi/routing/messages.go
+++ b/syncapi/routing/messages.go
@@ -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{
"from": from.String(),
"to": to.String(),