Skip to content

Commit

Permalink
Version up and some minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaCo committed Jun 27, 2021
1 parent 0d64ea3 commit 2b38644
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
9 changes: 4 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,18 @@ dotnet_diagnostic.IDE0055.severity = warning
dotnet_diagnostic.IDE0060.severity = warning
dotnet_diagnostic.IDE0082.severity = warning
dotnet_diagnostic.IDE1006.severity = warning
#dotnet_analyzer_diagnostic.category-Style.severity = warning



# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2



[*.{csproj,vbproj,proj,nativeproj,locproj}]
charset = utf-8

# JSON files
[*.json]
indent_size = 2

# Xml build files
[*.builds]
indent_size = 2
Expand Down
4 changes: 2 additions & 2 deletions samples/MiniDig/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"MiniDig": {
"commandName": "Project",
"commandLineArgs": "google.com"
"commandLineArgs": "google.com --cache"
}
}
}
}
2 changes: 1 addition & 1 deletion src/DnsClient/DnsClient.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<VersionPrefix>1.5.0</VersionPrefix>
<VersionPrefix>1.6.0</VersionPrefix>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>

<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net50;net45;net471</TargetFrameworks>
Expand Down
6 changes: 6 additions & 0 deletions src/DnsClient/NameServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ private static IReadOnlyCollection<NameServer> QueryNetworkInterfaces()
{
var properties = networkInterface.GetIPProperties();

// Can be null under mono for whatever reason...
if (properties == null)
{
continue;
}

foreach (var ip in properties.DnsAddresses)
{
result.Add(new NameServer(ip, DefaultPort, properties.DnsSuffix));
Expand Down
4 changes: 2 additions & 2 deletions src/DnsClient/Protocol/DnsResourceRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public ResourceRecordInfo(DnsString domainName, ResourceRecordType recordType, Q
RecordClass = recordClass;
RawDataLength = rawDataLength;
InitialTimeToLive = timeToLive;
_ticks = (int)(Environment.TickCount / 1000d);
_ticks = (int)((Environment.TickCount & int.MaxValue) / 1000d);
}
}
}
}

0 comments on commit 2b38644

Please sign in to comment.