Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
trudyhood committed Jan 4, 2022
1 parent b920c21 commit 5108f75
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions VpnHood.Tunneling/UdpProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ public abstract class UdpProxy : IDisposable
private IPEndPoint? _lastHostEndPoint;
private IPPacket? _lastPacket;
private bool _sameHost = true;
public static int c = 0; //todo

/// <param name="udpClientListener">Will be disposed by this object</param>
/// <param name="sourceEndPoint"></param>
public UdpProxy(UdpClient udpClientListener, IPEndPoint sourceEndPoint)
{
Interlocked.Increment(ref c);
VhLogger.Instance.LogWarning($"UdpProxy: {c}");

_udpClient = udpClientListener ?? throw new ArgumentNullException(nameof(udpClientListener));
_sourceEndPoint = sourceEndPoint ?? throw new ArgumentNullException(nameof(sourceEndPoint));
using var scope = VhLogger.Instance.BeginScope($"{VhLogger.FormatTypeName<UdpProxy>()}, LocalPort: {LocalPort}");
Expand Down Expand Up @@ -155,8 +151,6 @@ public void Dispose()
IsDisposed = true;

_udpClient.Dispose();
Interlocked.Decrement(ref c);
VhLogger.Instance.LogWarning($"UdpProxy: {c}");
}
}
}

0 comments on commit 5108f75

Please sign in to comment.