2007-12-27 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 27 Dec 2007 18:30:23 +0000 (18:30 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 27 Dec 2007 18:30:23 +0000 (18:30 -0000)
commit6162ce03bdac9aceaea5204c10ee15b3f224abae
tree5e74ace3ca7f23f457b4f8a7db02cf813e55bc5f
parent0877c2adc3f03c934fb88ecb8fd12c2669067a93
2007-12-27  Miguel de Icaza  <miguel@novell.com>

* WebClient.cs: We catch exceptions that happen on the helper
async threads toa void terminating the application on errors, and
also raise a variant of the OnXXXXCompleted methods that take an
Exception argument.

Note that this differs from the .NET implementation in that
we actually raise a signal on error, and set the exception, and in
their case no error is ever raised.

We now call CompleteAsync in the OnXXXCompleted handlers to ensure
that the WebClient can be reused immediately by the callback.

This fixes #350621.

This also should fix the bug report on IRC where someone
complained that they could not "chain" invocations to XXXAsync
methods from the OnXXXXCompleted handlers due to the WebClient
refusing to work if there was an ongoing operation

svn path=/trunk/mcs/; revision=91959
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/HttpListenerContext.cs
mcs/class/System/System.Net/WebClient.cs