Skip to content

Commit

Permalink
Simplify scope
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoseph committed Oct 28, 2024
1 parent 3b8e497 commit db8bf09
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal async Task PruneEndpointsAsync(CancellationToken token)
// for removal after releasing the active endpoints semaphore.
int endpointIndex = 0;

void removeEndpoint(IEndpointInfo endpoint, int endpointIndex, ServerEndpointState state)
void removeEndpoint(IEndpointInfo endpoint, ServerEndpointState state)
{
_activeEndpoints.RemoveAt(endpointIndex);
EndpointRemoved?.Invoke(this, new(endpoint, state));
Expand All @@ -108,7 +108,7 @@ void removeEndpoint(IEndpointInfo endpoint, int endpointIndex, ServerEndpointSta
case ServerEndpointState.Unresponsive:
if (now - activeEndpoint.LastContact > UnresponsiveGracePeriod)
{
removeEndpoint(activeEndpoint.Endpoint, endpointIndex, state);
removeEndpoint(activeEndpoint.Endpoint, state);
}
else
{
Expand All @@ -117,7 +117,7 @@ void removeEndpoint(IEndpointInfo endpoint, int endpointIndex, ServerEndpointSta
break;

case ServerEndpointState.Error:
removeEndpoint(activeEndpoint.Endpoint, endpointIndex, state);
removeEndpoint(activeEndpoint.Endpoint, state);
break;
}
}
Expand Down

0 comments on commit db8bf09

Please sign in to comment.