cesium-unreal
cesium-unreal copied to clipboard
When exiting PIE, the editor gets stuck for a long time
When exiting PIE, the editor will be stuck for a long time. It is a problem with requesting data. We can only add a timeout, but we don’t know if it is correct. Do you think we should add this judgment?
https://www.bilibili.com/video/BV1e7WBeEERR
UnrealAssetAccessor.cpp
return asyncSystem.createFuture<std::shared_ptrCesiumAsync::IAssetRequest>( [&url, &headers, &userAgent, &cesiumRequestHeaders](const auto& promise) { FHttpModule& httpModule = FHttpModule::Get(); TSharedRef<IHttpRequest, ESPMode::ThreadSafe> pRequest = httpModule.CreateRequest(); pRequest->SetURL(UTF8_TO_TCHAR(url.c_str()));
pRequest->SetTimeout(10);
for (const auto& header : headers) {
pRequest->SetHeader(
UTF8_TO_TCHAR(header.first.c_str()),
UTF8_TO_TCHAR(header.second.c_str()));
}
Adding a timeout is ok, but it's probably better to figure out why the server is taking so long to respond to some requests in your case. That's most likely the root of the issue here.
I'm closing this issue since it doesn't seem like there's anything actionable for us here. But please reopen if this is still an issue, @kak0na !