Disable Synchronization Context in the async calls

This commit is contained in:
Melnik Alexander 2018-10-06 14:21:30 +03:00
parent 462293ee0e
commit 59d2f824fb
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@
try
{
// Read flow of bytes
while ((readBytes = await stream.ReadAsync(buffer, offset, bufferSize)) > 0)
while ((readBytes = await stream.ReadAsync(buffer, offset, bufferSize).ConfigureAwait(false)) > 0)
{
length = length + readBytes;
offset = offset + readBytes;

View File

@ -35,7 +35,7 @@
try
{
// Read flow of bytes
while ((readBytes = await stream.ReadAsync(buffer, offset, bufferSize)) > 0)
while ((readBytes = await stream.ReadAsync(buffer, offset, bufferSize).ConfigureAwait(false)) > 0)
{
length = length + readBytes;
offset = offset + readBytes;