mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-15 09:21:02 +02:00
EventIndex: Cancel the crawler early after a message request.
If we're cancelling the crawler nowadays this means that we're likely deleting the index. Processing these messages is wasted effort in that case so break early.
This commit is contained in:
parent
ffe5d411db
commit
0c3d507455
@ -266,6 +266,11 @@ export default class EventIndex extends EventEmitter {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cancelled) {
|
||||||
|
this.crawlerCheckpoints.push(checkpoint);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (res.chunk.length === 0) {
|
if (res.chunk.length === 0) {
|
||||||
console.log("EventIndex: Done with the checkpoint", checkpoint);
|
console.log("EventIndex: Done with the checkpoint", checkpoint);
|
||||||
// We got to the start/end of our timeline, lets just
|
// We got to the start/end of our timeline, lets just
|
||||||
|
Loading…
x
Reference in New Issue
Block a user