Skip to content

Commit

Permalink
Patch LTS to fix Dotnetty threading and DeviceClient NRE exception is…
Browse files Browse the repository at this point in the history
…sue. (#2287)

* Adding Common 0.7.1 (#2272)
* fix(DeviceClient): Avoid NRE after client dispose (#2286)
* Exclude low pri .net targets in PR builds (#2277)
* Update package versions

Co-authored-by: jamdavi <[email protected]>
Co-authored-by: David R. Williamson <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2022
1 parent e4d52d0 commit 4515e44
Show file tree
Hide file tree
Showing 11 changed files with 317 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Devices.E2ETests.Iothub.Service
{
[TestClass]
[TestCategory("InvalidServiceCertificate")]
[Ignore("TODO: Enable when invalid cert server is back online.")]
public class IoTHubCertificateValidationE2ETest : E2EMsTestBase
{
[LoggedTestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Devices.E2ETests.Provisioning
{
[TestClass]
[TestCategory("InvalidServiceCertificate")]
[Ignore("TODO: Enable when invalid cert server is back online.")]
public class ProvisioningCertificateValidationE2ETest : E2EMsTestBase
{
[LoggedTestMethod]
Expand Down
1 change: 0 additions & 1 deletion iothub/device/src/DeviceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ protected virtual void Dispose(bool disposing)
if (disposing)
{
InternalClient?.Dispose();
InternalClient = null;
}
}

Expand Down
1 change: 0 additions & 1 deletion iothub/device/src/InternalClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,6 @@ internal void ValidateModuleTransportHandler(string apiName)
public void Dispose()
{
InnerHandler?.Dispose();
InnerHandler = null;
_methodsDictionarySemaphore?.Dispose();
_moduleReceiveMessageSemaphore?.Dispose();
_fileUploadHttpTransportHandler?.Dispose();
Expand Down
4 changes: 3 additions & 1 deletion iothub/device/src/Microsoft.Azure.Devices.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>1.36.3</Version>
<Version>1.36.4</Version>
<Title>Microsoft Azure IoT Device Client SDK</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down Expand Up @@ -69,6 +69,8 @@
<Compile Include="ModernDotNet\HsmAuthentication\Transport\HttpRequestResponseSerializer.cs" />
<Compile Include="ModernDotNet\HsmAuthentication\Transport\UnixDomainSocketEndPoint.cs" />
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.7.0" />
<!-- We will need to keep this reference to DotNetty.Common until the next release of DotNetty includes this dependency -->
<PackageReference Include="DotNetty.Common" Version="0.7.1" />
<PackageReference Include="DotNetty.Handlers" Version="0.7.0" />
</ItemGroup>

Expand Down
17 changes: 8 additions & 9 deletions iothub/device/tests/Microsoft.Azure.Devices.Client.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@
<DefaultItemExcludes>HsmAuthentication/**;$(DefaultItemExcludes)</DefaultItemExcludes>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net451' ">
<Compile Include="HsmAuthentication\**" />
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.7.0" />
<PackageReference Include="DotNetty.Handlers" Version="0.7.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.6.0" />
<PackageReference Include="DotNetty.Handlers" Version="0.6.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net451' ">
<Compile Include="HsmAuthentication\**" />
<Compile Remove="ClientWebSocketTransportTests.cs" />
<Compile Remove="Mqtt\ClientWebSocketChannelTests.cs" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.6.0" />
<PackageReference Include="DotNetty.Handlers" Version="0.6.0" />
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.7.0" />
<!-- We will need to keep this reference to DotNetty.Common until the next release of DotNetty includes this dependency -->
<PackageReference Include="DotNetty.Common" Version="0.7.1" />
<PackageReference Include="DotNetty.Handlers" Version="0.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 9 additions & 2 deletions provisioning/service/src/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ namespace Microsoft.Azure.Devices.Provisioning.Service
/// <remarks>
/// The <see cref="Query"/> iterator is the result of the query factory for
/// <list type="bullet">
/// <item><b>IndividualEnrollment:</b>
/// <see cref="ProvisioningServiceClient.CreateIndividualEnrollmentQuery(QuerySpecification, int)"/>
/// <item>
/// <description>
/// <see cref="ProvisioningServiceClient.CreateIndividualEnrollmentQuery(QuerySpecification, int)">IndividualEnrollment</see>
/// </description>
/// </item>
/// <item>
/// <description>
/// <see cref="ProvisioningServiceClient.CreateEnrollmentGroupQuery(QuerySpecification, int)">EnrollmentGroup</see>
/// </description>
/// </item>
/// <item><b>EnrollmentGroup:</b>
/// <see cref="ProvisioningServiceClient.CreateEnrollmentGroupQuery(QuerySpecification, int)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>1.14.1</Version>
<Version>1.14.2</Version>
<Title>Microsoft Azure IoT Provisioning Device Client MQTT Transport</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down Expand Up @@ -98,6 +98,8 @@

<ItemGroup>
<PackageReference Include="DotNetty.Codecs.Mqtt" Version="0.7.0" />
<!-- We will need to keep this reference to DotNetty.Common until the next release of DotNetty includes this dependency -->
<PackageReference Include="DotNetty.Common" Version="0.7.1" />
<PackageReference Include="DotNetty.Handlers" Version="0.7.0" />

<!-- FXCop -->
Expand Down
Loading

0 comments on commit 4515e44

Please sign in to comment.