File tree 1 file changed +11
-8
lines changed
src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -253,17 +253,20 @@ private static async Task<WasmFetchResponse> CallFetch(HttpRequestMessage reques
253
253
view = buffer ??= new byte [ 65536 ] ;
254
254
}
255
255
256
- try
256
+ using ( controller )
257
257
{
258
- int length = await stream . ReadAsync ( view , cancellationToken ) . ConfigureAwait ( true ) ;
259
- using ( Buffers . MemoryHandle handle = view . Pin ( ) )
258
+ try
260
259
{
261
- ReadableStreamControllerEnqueueUnsafe ( controller , handle , length ) ;
260
+ int length = await stream . ReadAsync ( view , cancellationToken ) . ConfigureAwait ( true ) ;
261
+ using ( Buffers . MemoryHandle handle = view . Pin ( ) )
262
+ {
263
+ ReadableStreamControllerEnqueueUnsafe ( controller , handle , length ) ;
264
+ }
265
+ }
266
+ catch ( Exception ex )
267
+ {
268
+ BrowserHttpInterop . ReadableStreamControllerError ( controller , ex ) ;
262
269
}
263
- }
264
- catch ( Exception ex )
265
- {
266
- BrowserHttpInterop . ReadableStreamControllerError ( controller , ex ) ;
267
270
}
268
271
} ;
269
272
You can’t perform that action at this time.
0 commit comments