summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-28 17:44:04 +0000
committerErik Johnston <erik@matrix.org>2016-01-28 17:44:04 +0000
commit82cf3a8043a6ffe1f57d78bf88eba06ad0c53fbe (patch)
tree9855dc207568a624e78f2776ac8b08db818be5ad /synapse
parentDon't use defer.returnValue (diff)
downloadsynapse-82cf3a8043a6ffe1f57d78bf88eba06ad0c53fbe.tar.xz
Fix inequalities
Diffstat (limited to 'synapse')
-rw-r--r--synapse/util/caches/stream_change_cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/caches/stream_change_cache.py b/synapse/util/caches/stream_change_cache.py
index b48f5cb273..483e0cdf96 100644
--- a/synapse/util/caches/stream_change_cache.py
+++ b/synapse/util/caches/stream_change_cache.py
@@ -45,7 +45,7 @@ class StreamChangeCache(object):
         """
         assert type(stream_pos) is int
 
-        if stream_pos <= self._earliest_known_stream_pos:
+        if stream_pos < self._earliest_known_stream_pos:
             cache_counter.inc_misses(self.name)
             return True
 
@@ -67,7 +67,7 @@ class StreamChangeCache(object):
         """
         assert type(stream_pos) is int
 
-        if stream_pos > self._earliest_known_stream_pos:
+        if stream_pos >= self._earliest_known_stream_pos:
             keys = self._cache.keys()
             i = keys.bisect_right(stream_pos)