From f114662fdaf0e7e150df180aee2b443448ccf398 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Tue, 18 Jan 2022 10:07:11 -0800 Subject: [PATCH] fix(DeviceClient): Avoid NRE after client dispose (#2286) --- iothub/device/src/DeviceClient.cs | 1 - iothub/device/src/InternalClient.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/iothub/device/src/DeviceClient.cs b/iothub/device/src/DeviceClient.cs index 4bd9151a9b..62a66f93ba 100644 --- a/iothub/device/src/DeviceClient.cs +++ b/iothub/device/src/DeviceClient.cs @@ -691,7 +691,6 @@ protected virtual void Dispose(bool disposing) if (disposing) { InternalClient?.Dispose(); - InternalClient = null; } } diff --git a/iothub/device/src/InternalClient.cs b/iothub/device/src/InternalClient.cs index f4720015c3..2031a99f36 100644 --- a/iothub/device/src/InternalClient.cs +++ b/iothub/device/src/InternalClient.cs @@ -1902,7 +1902,6 @@ internal void ValidateModuleTransportHandler(string apiName) public void Dispose() { InnerHandler?.Dispose(); - InnerHandler = null; _methodsSemaphore?.Dispose(); _moduleReceiveMessageSemaphore?.Dispose(); _fileUploadHttpTransportHandler?.Dispose();