Local Media CommunicationsClient hangs on exit
Describe the issue An application with a local media CommuncationsClient hangs on exit and never terminates. Only if forcing exit with Environment.Exit() enables application termination.
The CommuncationsClient in application does nothing except initialization and termination.
Problem can be reproduced in the minimal application below.
I'm using the latest Microsoft.Graph.Communications.Calls.* packages version 1.2.0.791.
Code Snippet ` graphlogger.txt static void Main(string[] args) { var logger = new GraphLogger(name);
var builder = new CommunicationsClientBuilder(name, appId, logger);
var authProvider = new AuthenticationProvider(name, appId, appSecret, logger);
builder.SetAuthenticationProvider(authProvider);
IPAddress publicIpAddress = Dns.GetHostEntry(serviceFqdn).AddressList[0];
builder.SetNotificationUrl(new Uri("https://dummy-notifurl"));
builder.SetServiceBaseUrl(new Uri("https://dummy-serviceurl"));
builder.SetMediaPlatformSettings(
new MediaPlatformSettings
{
ApplicationId = appId,
HostingEnvironmentConfiguration = HostingEnvironmentConfiguration.Default,
MediaPlatformInstanceSettings =
new MediaPlatformInstanceSettings
{
CertificateThumbprint = cert,
ServiceFqdn = serviceFqdn,
InstancePublicPort = publicPort,
InstanceInternalPort = internalPort,
InstancePublicIPAddress = publicIpAddress,
},
});
var client = builder.Build();
client.TerminateAsync().Wait();
client.Dispose();
// Uncomment line below to enable application exit
// Environment.Exit(0);
}
`
Expected behavior Successful termination
Graph SDK (please complete the following information): 1.2.0.791.
Call ID Provide the list call ids that encountered this issue. Include the time in UTC/GMT when these call have occurred.
Logs See attached.
Additional context Add any other context about the problem here.
I encountered the same issue.