diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-06-22 01:30:08 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-06-22 01:30:08 +0400 |
commit | 1d125695a2f1db35afba77ed298dc72def769e86 (patch) | |
tree | 7fe14d1a76c7c57bb1e5f3107c19a858cdb71548 | |
parent | cb211e4e89523e37865b46c53bab8c13667904a5 (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/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System/System.Net/WebConnection.cs | 15 |
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 { |