Disable Synchronization Context in the async calls
This commit is contained in:
parent
462293ee0e
commit
59d2f824fb
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user