mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-28 13:41:08 +02:00
Fix issue where reset of server was prematurely causing the drop of
an ajax connection which was causing an error popup.
This commit is contained in:
parent
03b146cfb2
commit
701c457ad4
2 changed files with 18 additions and 6 deletions
|
@ -70,11 +70,23 @@ $(document).ready(function(){
|
||||||
|
|
||||||
var ajaxObject = $.ajax(ajaxParams);
|
var ajaxObject = $.ajax(ajaxParams);
|
||||||
ajaxObject.fail(function (jqXHR, textStatus, errorThrown) {
|
ajaxObject.fail(function (jqXHR, textStatus, errorThrown) {
|
||||||
showErrorMessage(
|
// status of 0 means the connection was reset, which
|
||||||
"Error",
|
// happens after the content is parsed and the server restarts
|
||||||
"There was a problem restoring domain content.\n"
|
// in the case of json and json.gz files
|
||||||
+ "Please ensure that the content archive or entity file is valid and try again."
|
if (jqXHR.status != 0) {
|
||||||
);
|
showErrorMessage(
|
||||||
|
"Error",
|
||||||
|
"There was a problem restoring domain content.\n"
|
||||||
|
+ "Please ensure that the content archive or entity file is valid and try again."
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
isRestoring = true;
|
||||||
|
|
||||||
|
// immediately reload backup information since one should be restoring now
|
||||||
|
reloadBackupInformation();
|
||||||
|
|
||||||
|
swal.close();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
updateProgressBars($('.upload-content-progress'), (offset + nextChunkSize) * 100 / fileSize);
|
updateProgressBars($('.upload-content-progress'), (offset + nextChunkSize) * 100 / fileSize);
|
||||||
|
|
|
@ -2190,7 +2190,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else if (url.path() == URI_RESTART) {
|
} else if (url.path() == URI_RESTART) {
|
||||||
connection->respond(HTTPConnection::StatusCode200);
|
connection->respond(HTTPConnection::StatusCode204);
|
||||||
restart();
|
restart();
|
||||||
return true;
|
return true;
|
||||||
} else if (url.path() == URI_API_METAVERSE_INFO) {
|
} else if (url.path() == URI_API_METAVERSE_INFO) {
|
||||||
|
|
Loading…
Reference in a new issue