[system] Don't throw ObjectDisposedException on cancelled async WebConnection. Fixes #31507

This commit is contained in:
Marek Safar committed 2015-07-01 16:41:56 +02:00
1 parent 8be963e71b
commit 613c2a9182
1 file changed
+2
@@ -1067,6 +1067,8 @@ namespace System.Net
Stream s = null;
lock (this) {
if (status == WebExceptionStatus.RequestCanceled)
return true;
if (Data.request != request)
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
if (nstream == null)