File tree Expand file tree Collapse file tree 1 file changed +16
-20
lines changed Expand file tree Collapse file tree 1 file changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -671,28 +671,24 @@ internal static void ReadBytesAsync (
671671 0 ,
672672 length ,
673673 ar => {
674- byte [ ] bytes = null ;
675-
676674 try {
677- var len = stream . EndRead ( ar ) ;
678- bytes = len < 1
679- ? new byte [ 0 ]
680- : len < length
681- ? stream . readBytes ( buff , len , length - len )
682- : buff ;
683- }
684- catch ( ObjectDisposedException ) {
685- // The Stream has been closed.
686- return ;
687- }
688- catch ( Exception ex ) {
689- if ( error != null )
690- error ( ex ) ;
691-
692- return ;
693- }
675+ byte [ ] bytes = null ;
676+ try {
677+ var len = stream . EndRead ( ar ) ;
678+ bytes = len < 1
679+ ? new byte [ 0 ]
680+ : len < length
681+ ? stream . readBytes ( buff , len , length - len )
682+ : buff ;
683+ }
684+ catch ( ObjectDisposedException ) {
685+ // The Stream has been closed.
686+ return ;
687+ }
688+ catch {
689+ throw ;
690+ }
694691
695- try {
696692 if ( completed != null )
697693 completed ( bytes ) ;
698694 }
You can’t perform that action at this time.
0 commit comments