diff --git a/Util/GloballyThrottledStream.cs b/Util/GloballyThrottledStream.cs index c49a21b..dbe92d6 100644 --- a/Util/GloballyThrottledStream.cs +++ b/Util/GloballyThrottledStream.cs @@ -78,7 +78,7 @@ private static long Leak(long mbps) { } public override int Read(byte[] buffer, int offset, int count) { - var mbps = _maxBytesPerSecond; + var mbps = Interlocked.Read(ref _maxBytesPerSecond); int amt; if (mbps == 0) {