When a requast is aborted on .NET a WebException is thrown and not a
ObjectDisposedException as we were doing.
Fixes #41477
{
Stream s = null;
lock (this) {
{
Stream s = null;
lock (this) {
+ if (request.Aborted)
+ throw new WebException ("Request aborted", WebExceptionStatus.RequestCanceled);
if (Data.request != request)
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
if (nstream == null)
if (Data.request != request)
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
if (nstream == null)