From 17405aacb09dc997bc81bd698f6913fedf034924 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 9 Nov 2021 10:24:50 +1300 Subject: [PATCH] Clean up --- .../Internal/SocketConnectivitySubchannelTransport.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs b/src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs index 1bc02d3d3..008efe044 100644 --- a/src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs +++ b/src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs @@ -59,7 +59,7 @@ internal class SocketConnectivitySubchannelTransport : ISubchannelTransport, IDi private Socket? _initialSocket; private DnsEndPoint? _initialSocketEndPoint; private bool _disposed; - private BalancerAddress? _currentEndPoint; + private BalancerAddress? _currentAddress; public SocketConnectivitySubchannelTransport(Subchannel subchannel, TimeSpan socketPingInterval, ILoggerFactory loggerFactory) { @@ -71,7 +71,7 @@ public SocketConnectivitySubchannelTransport(Subchannel subchannel, TimeSpan soc } public object Lock => _subchannel.Lock; - public BalancerAddress? CurrentAddress => _currentEndPoint; + public BalancerAddress? CurrentAddress => _currentAddress; public bool HasStream { get; } // For testing. Take a copy under lock for thread-safety. @@ -92,7 +92,7 @@ public void Disconnect() _initialSocketEndPoint = null; _lastEndPointIndex = 0; _socketConnectedTimer.Change(TimeSpan.Zero, TimeSpan.Zero); - _currentEndPoint = null; + _currentAddress = null; } _subchannel.UpdateConnectivityState(ConnectivityState.Idle, "Disconnected."); } @@ -125,7 +125,7 @@ public async ValueTask TryConnectAsync(CancellationToken cancellationToken lock (Lock) { - _currentEndPoint = currentAddress; + _currentAddress = currentAddress; _lastEndPointIndex = currentIndex; _initialSocket = socket; _initialSocketEndPoint = currentAddress.EndPoint; @@ -196,7 +196,7 @@ private async void OnCheckSocketConnection(object? state) _initialSocket.Dispose(); _initialSocket = null; _initialSocketEndPoint = null; - _currentEndPoint = null; + _currentAddress = null; _lastEndPointIndex = 0; } }