Skip to content

Commit

Permalink
fix: read mbps correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Oct 29, 2023
1 parent 989f3a0 commit fe9fb1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Util/GloballyThrottledStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fe9fb1f

Please sign in to comment.