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

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs')
-rw-r--r--src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
index fdf7d48e56..d10a2233dc 100644
--- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
+++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
@@ -115,10 +115,21 @@ namespace System.Net.Http
}
}
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -161,10 +172,21 @@ namespace System.Net.Http
await _connection.FillAsync().ConfigureAwait(false);
}
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();