Skip to content

Commit

Permalink
hang on on identityexception
Browse files Browse the repository at this point in the history
  • Loading branch information
vharseko committed Apr 16, 2018
1 parent c693b5d commit 36128cc
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions ru.org.openam.sdk/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,31 @@ public bool HasConfig()
Boolean reread_config=true;
public Dictionary<String, Object> GetConfig()
{
if (config == null || reread_config){
config =
((identity.Response)new identity.Request(
getSession().GetProperty("UserId"),
new String[] {
"realm",
"objecttype"
},
new KeyValuePair<string, string>[]{
new KeyValuePair<string,string>("realm",Bootstrap.getAppRealm()),
new KeyValuePair<string,string>("objecttype","Agent")
},
getSession()
).getResponse()).property;
reread_config = false;
Log.Init();
while (config == null || reread_config){
try
{
config =
((identity.Response)new identity.Request(
getSession().GetProperty("UserId"),
new String[] {
"realm",
"objecttype"
},
new KeyValuePair<string, string>[]{
new KeyValuePair<string,string>("realm",Bootstrap.getAppRealm()),
new KeyValuePair<string,string>("objecttype","Agent")
},
getSession()
).getResponse()).property;

reread_config = false;
Log.Init();
}
catch (identity.IdentityException ex)
{
Log.Error(ex);
session = null;
}
}
return config;
}
Expand Down

0 comments on commit 36128cc

Please sign in to comment.