-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(fix): Build error due to missing dispose #1768
Conversation
iothub/device/src/DeviceAuthenticationWithRegistrySymmetricKey.cs
Outdated
Show resolved
Hide resolved
We'll also need to update AuthenticationWithTokenRefresh to have it not implement IDisposable again |
5f82936
to
7324a53
Compare
Will remove |
7324a53
to
0ce38d5
Compare
0ce38d5
to
40e4a45
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
iothub/device/src/ModuleAuthenticationWithRegistrySymmetricKey.cs
Outdated
Show resolved
Hide resolved
d852b38
to
f2979e1
Compare
df5e871
to
cd17f05
Compare
cd17f05
to
5386a8f
Compare
Tested on the main pipeline and everything works well now. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Certificate?.Dispose(); | ||
Certificate = null; | ||
#endif | ||
IotHubConnectionString?.TokenRefresher?.Dispose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to dispose whatever is needed here. Making the IotHubConnectionString class did not seem right as we really do not want that dispose to be called anywhere else.
Checklist
master
branch.Description of the changes
Some implementations of IAuthenticationMethod have objects that need to be disposed. And we were not disposing because the interface did not have IDisposable and the implementations did not dispose anything.
This change makes the interface disposable and hence any implementation that has disposable objects, dispose them. It is a no-op for the rest.
This also means, the public IotHubConnectionStringBuilder is now IDisposable. This could be a breaking change but something necessary.