microsoftgraph / microsoftgraph/microsoft-graph-comms-samples
Local Media CommunicationsClient hangs on exit
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 253
- Forks
- 275
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal application shown in the issue and reproduce the hang around client.TerminateAsync().Wait() and client.Dispose(). Review the attached graphlogger.txt for shutdown activity. Done means the application terminates successfully without requiring Environment.Exit(0).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100