2007-01-24 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 25 Jan 2007 06:12:54 +0000 (06:12 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 25 Jan 2007 06:12:54 +0000 (06:12 -0000)
* StreamReader.cs: fix for bug #75526. We return earlier from Read () if
the underlying stream might block or end on the next read.

svn path=/trunk/mcs/; revision=71650

mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/StreamReader.cs

index 9b0f387c3dba0cceb19b01db1db77630220dd4e8..07d36a4f9d1097318da165e3e86c74a1f6a065c8 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-24 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
+
+       * StreamReader.cs: fix for bug #75526. We return earlier from Read () if
+       the underlying stream might block or end on the next read.
+
 2007-01-22  Miguel de Icaza  <miguel@novell.com>
 
        * DirectoryInfo.cs: Throw a better exception (accorind go the
index 9102031f2f3ef4bfd276129172d6180c0f990282..3599f25ac7408038bf9bab6a32dd8667dcfcfee8 100644 (file)
@@ -375,6 +375,8 @@ namespace System.IO {
                                index += cch;
                                count -= cch;
                                chars_read += cch;
+                               if (mayBlock)
+                                       break;
                        }
                        return chars_read;
                }