Merge pull request #9893 from umbraco/netcore/bugfix/installing-packages
Netcore: Fix installing packages
This commit is contained in:
@@ -50,6 +50,7 @@ namespace Umbraco.Cms.Web.BackOffice.Filters
|
||||
if (userIdentity.HasClaim(x => x.Type == ClaimTypes.CookiePath) == false)
|
||||
{
|
||||
await next();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,13 +146,14 @@
|
||||
|
||||
//check if the app domain is restarted ever 2 seconds
|
||||
var count = 0;
|
||||
var maxCount = 5;
|
||||
|
||||
function checkRestart() {
|
||||
$timeout(function () {
|
||||
packageResource.checkRestart(pack).then(function (d) {
|
||||
count++;
|
||||
//if there is an id it means it's not restarted yet but we'll limit it to only check 10 times
|
||||
if (d.isRestarting && count < 10) {
|
||||
if (d.isRestarting && count < maxCount) {
|
||||
checkRestart();
|
||||
}
|
||||
else {
|
||||
@@ -160,9 +161,16 @@
|
||||
deferred.resolve(d);
|
||||
}
|
||||
},
|
||||
installError);
|
||||
function(){
|
||||
if(count >= maxCount){
|
||||
installError();
|
||||
}
|
||||
else {
|
||||
checkRestart();
|
||||
}
|
||||
});
|
||||
},
|
||||
2000);
|
||||
2000*(count+1));
|
||||
}
|
||||
|
||||
checkRestart();
|
||||
|
||||
Reference in New Issue
Block a user