Login Fails randomly in MIPSDK 2022R3

I am trying to connect a management server with 2022 R3 and It Fails to connect 5 out of 6 times.

I strongly believe that it is because of some thing about new timeout introduced In 2022 R3

2022 R3 release note says that “A ConnectionCheckTimeout key has been added to VideoOS.Platform.EnvironmentOptions

How to modify or use ConnectionCheckTimeout ?

Is there any option to retry login if it fails ?

VideoOS.Platform.SDK.Environment.Initialize();
VideoOS.Platform.SDK.Log.Environment.Initialize();
Console.WriteLine("VideoOS.Platform.SDK Initialized");
 
Uri uri = new Uri(ConfigurationManager.AppSettings["VMSServer"].ToString());
 
Console.WriteLine("Uri for BuildCredentialCache : " + uri.ToString());
 
VideoOS.Platform.SDK.Environment.RemoveAllServers();
 
_credentialCache = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, "", "", "Negotiate");
 
Item siteItem = VideoOS.Platform.SDK.Environment.LoadSiteItem(false, uri, _credentialCache);
 
if (siteItem != null)
{
	Console.WriteLine("siteItem is not null. Name :" + siteItem.Name);
	VideoOS.Platform.SDK.Environment.AddServer(false, siteItem, _credentialCache);
}
 
bool logged = VideoOS.Platform.SDK.Environment.IsLoggedInToAnyServer();
Console.WriteLine("IsLoggedInToAnyServer :" + logged);
try
{
	Console.WriteLine("ServerId.Uri :" + siteItem.FQID.ServerId.Uri);
	Console.WriteLine("IntegrationId :" + IntegrationId);
	Console.WriteLine("IntegrationName :" + IntegrationName);
	Console.WriteLine("Version :" + Version);
	Console.WriteLine("ManufacturerName :" + ManufacturerName);
 
	VideoOS.Platform.SDK.Environment.Login(siteItem.FQID.ServerId.Uri, IntegrationId, IntegrationName, Version, ManufacturerName);
	bool logged2 = VideoOS.Platform.SDK.Environment.IsLoggedInToAnyServer();
	Console.WriteLine("IsLoggedInToAnyServer :" + logged2);
}
catch (Exception ex)
{
	Console.WriteLine("Error during logging in : ", ex);
	Console.WriteLine("Error during logging in, URI : " + uri.ToString() + ex.Message);
	VideoOS.Platform.SDK.Environment.RemoveServer(siteItem.FQID.ServerId.Id);
}

Please try to include and manipulate this setting.

EnvironmentManager.Instance.EnvironmentOptions[EnvironmentOptions.ConnectionCheckTimeout]

Set it to a value greater than 5, 5 is default, and means a time out of 5 seconds.

Try to add this code after the initialize statements -

EnvironmentManager.Instance.EnvironmentOptions[EnvironmentOptions.ConnectionCheckTimeout] = "30";

ok thank you

Is there any retry option available in sdk ?

No, there is neither such built-in functionality nor such a sample. You can make your own retry loop.

By the way, have you tried the code in the previous post? Did it work for you?