Skip to content

Commit

Permalink
Pass cancellation token to the resolver (microsoft#349)
Browse files Browse the repository at this point in the history
* Pass cancellation token to the resolver func

* pass cancellation token to RegisterServiceNotificationFilterAsync

* service Uri can be added to registrationCache before the RegisterServiceNotificationFilterAsync call
  • Loading branch information
yashagarwal23 authored Mar 20, 2023
1 parent 4c39943 commit 2901088
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ private async Task<ResolvedServicePartition> ResolveHelperAsync(
client,
previousRsp,
totaltime.GetRemainingTime(),
CancellationToken.None);
cancellationToken);
}
catch (Exception ex)
{
Expand Down Expand Up @@ -625,10 +625,10 @@ private async Task<ResolvedServicePartition> ResolveHelperAsync(
if (added)
{
ServiceNotificationFilterDescription filter = new ServiceNotificationFilterDescription(
name: serviceUri,
matchNamePrefix: true,
matchPrimaryChangeOnly: false);
await client.ServiceManager.RegisterServiceNotificationFilterAsync(filter, totaltime.GetRemainingTime(), CancellationToken.None);
name: serviceUri,
matchNamePrefix: true,
matchPrimaryChangeOnly: false);
await client.ServiceManager.RegisterServiceNotificationFilterAsync(filter, totaltime.GetRemainingTime(), cancellationToken);
}
}
}
Expand Down

0 comments on commit 2901088

Please sign in to comment.