Browse Source

atomic operations to increase traffic statistics

tags/3.0
Gang Zhuo 9 years ago
parent
commit
12ba488c7b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      shadowsocks-csharp/Controller/ShadowsocksController.cs

+ 2
- 2
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -309,12 +309,12 @@ namespace Shadowsocks.Controller
public void UpdateInboundCounter(long n)
{
inboundCounter += n;
Interlocked.Add(ref inboundCounter, n);
}
public void UpdateOutboundCounter(long n)
{
outboundCounter += n;
Interlocked.Add(ref outboundCounter, n);
}
protected void Reload()


Loading…
Cancel
Save