Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-06-22 01:30:08 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-06-22 01:30:08 +0400
commit1d125695a2f1db35afba77ed298dc72def769e86 (patch)
tree7fe14d1a76c7c57bb1e5f3107c19a858cdb71548
parentcb211e4e89523e37865b46c53bab8c13667904a5 (diff)
2005-06-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* WebConnection.cs: SslClientStream.BeginRead might not be asynchronous if there's no record available to read. This is a workaround that makes the call to BeginRead itself asynchronous. Fixes bug #75342. svn path=/branches/mono-1-1-7/mcs/; revision=46329
-rw-r--r--mcs/class/System/System.Net/ChangeLog6
-rw-r--r--mcs/class/System/System.Net/WebConnection.cs15
2 files changed, 20 insertions, 1 deletions
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index fc1b91bf2d4..2f83775c54b 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * WebConnection.cs: SslClientStream.BeginRead might not be asynchronous
+ if there's no record available to read. This is a workaround that makes
+ the call to BeginRead itself asynchronous. Fixes bug #75342.
+
2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* WebConnection.cs:
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index 7f2c8bc6998..aa4fc95122d 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -395,10 +395,23 @@ namespace System.Net
sPoint.SetCertificates (client, server);
certsAvailable = (server != null);
}
-
+
+ delegate void MyDelegate (object o);
+
internal static void InitRead (object state)
{
WebConnection cnc = (WebConnection) state;
+ if (!cnc.ssl) {
+ InitRead2 (state);
+ } else {
+ MyDelegate d = new MyDelegate (InitRead2);
+ d.BeginInvoke (state, null, null);
+ }
+ }
+
+ static void InitRead2 (object state)
+ {
+ WebConnection cnc = (WebConnection) state;
Stream ns = cnc.nstream;
try {