Skip to content

Commit 0aa4c56

Browse files
committed
Fixed regression
1 parent 24e0ad6 commit 0aa4c56

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/DotNext.Tests/Threading/AsyncReaderWriterLockTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,10 @@ public static async Task AcquireReadWriteLockSynchronously()
226226
{
227227
using var l = new AsyncReaderWriterLock();
228228
True(l.TryEnterReadLock(DefaultTimeout));
229-
True(l.TryEnterReadLock(DefaultTimeout));
230-
Equal(2L, l.CurrentReadCount);
229+
Equal(1L, l.CurrentReadCount);
231230

232231
var t = Task.Factory.StartNew(() => l.TryEnterWriteLock(DefaultTimeout), TaskCreationOptions.LongRunning);
233232

234-
l.Release();
235233
l.Release();
236234

237235
True(await t);

src/DotNext/Buffers/ByteBuffer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public static T Read7BitEncodedInteger<T>(this ref SpanReader<byte> reader)
357357
do
358358
{
359359
octet = reader.Read();
360-
} while (!decoder.Append(octet));
360+
} while (decoder.Append(octet));
361361

362362
return decoder.Value;
363363
}

0 commit comments

Comments
 (0)