Skip to content

Commit

Permalink
Merge pull request #116 from Drawaes/FixingLeadership
Browse files Browse the repository at this point in the history
Allow skipping service look up for IP addresses
  • Loading branch information
Drawaes authored May 15, 2019
2 parents 23b279f + fb893be commit 0f45fee
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CondenserDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release Notes", "Release No
releasenotes\4.0.3.props = releasenotes\4.0.3.props
releasenotes\4.1.0.props = releasenotes\4.1.0.props
releasenotes\4.1.1.props = releasenotes\4.1.1.props
releasenotes\4.1.10.props = releasenotes\4.1.10.props
releasenotes\4.1.3.props = releasenotes\4.1.3.props
releasenotes\4.1.4.props = releasenotes\4.1.4.props
releasenotes\4.1.9.props = releasenotes\4.1.9.props
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/4.1.10.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<PackageReleaseNotes>
* Added ability to skip service lookup for Delegating Handlers
</PackageReleaseNotes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class ServiceRegistryDelegatingHandler : DelegatingHandler
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var currentUri = request.RequestUri;
if (System.Net.IPAddress.TryParse(currentUri.Host, out _)) return await base.SendAsync(request, cancellationToken);
var serviceInstance = await _serviceRegistry.GetServiceInstanceAsync(currentUri.Host);
if (serviceInstance == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class ServiceRegistryNearestDelegatingHandler : DelegatingHandler
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var currentUri = request.RequestUri;
if (System.Net.IPAddress.TryParse(currentUri.Host, out _)) return await base.SendAsync(request, cancellationToken);
var serviceInstance = await _serviceRegistry.GetNearestServiceInstanceAsync(currentUri.Host);
if (serviceInstance == null)
{
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>4.1.9</VersionPrefix>
<VersionPrefix>4.1.10</VersionPrefix>
<VersionSuffix>beta</VersionSuffix>
</PropertyGroup>
</Project>

0 comments on commit 0f45fee

Please sign in to comment.