aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/projectstore')
-rw-r--r--src/zenserver/projectstore/remoteprojectstore.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp
index 911628386..e61ccd917 100644
--- a/src/zenserver/projectstore/remoteprojectstore.cpp
+++ b/src/zenserver/projectstore/remoteprojectstore.cpp
@@ -2743,6 +2743,12 @@ ParseOplogContainer(const CbObject& ContainerObject,
NiceBytes(Chunked.RawSize),
Chunked.ChunkHashes.size());
}
+ if (remotestore_impl::IsCancelled(OptionalContext))
+ {
+ return RemoteProjectStore::Result{.ErrorCode = gsl::narrow<int>(HttpResponseCode::OK),
+ .ElapsedSeconds = Timer.GetElapsedTimeMs() / 1000.0,
+ .Reason = "Operation cancelled"};
+ }
}
size_t NeedBlockCount = 0;
@@ -2787,6 +2793,12 @@ ParseOplogContainer(const CbObject& ContainerObject,
NeedBlockCount++;
}
}
+ if (remotestore_impl::IsCancelled(OptionalContext))
+ {
+ return RemoteProjectStore::Result{.ErrorCode = gsl::narrow<int>(HttpResponseCode::OK),
+ .ElapsedSeconds = Timer.GetElapsedTimeMs() / 1000.0,
+ .Reason = "Operation cancelled"};
+ }
}
remotestore_impl::ReportMessage(OptionalContext,
fmt::format("Requesting {} of {} attachment blocks", NeedBlockCount, BlocksArray.Num()));
@@ -2801,6 +2813,12 @@ ParseOplogContainer(const CbObject& ContainerObject,
OnNeedAttachment(AttachmentHash);
NeedAttachmentCount++;
}
+ if (remotestore_impl::IsCancelled(OptionalContext))
+ {
+ return RemoteProjectStore::Result{.ErrorCode = gsl::narrow<int>(HttpResponseCode::OK),
+ .ElapsedSeconds = Timer.GetElapsedTimeMs() / 1000.0,
+ .Reason = "Operation cancelled"};
+ }
};
remotestore_impl::ReportMessage(OptionalContext,
fmt::format("Requesting {} of {} large attachments", NeedAttachmentCount, LargeChunksArray.Num()));