Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Last active December 27, 2015 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonpryor/4161cf3b927ada7d2756 to your computer and use it in GitHub Desktop.
Save jonpryor/4161cf3b927ada7d2756 to your computer and use it in GitHub Desktop.
I/mono-stdout(13561): # WebConnection.CreateStream; from 5 Threadpool worker
I/mono-stdout(13561): # WebConnection.Write; from 5 Threadpool worker
I/mono-stdout(13561): # WebConnection.Close; from 1 at at System.Environment.get_StackTrace()
I/mono-stdout(13561): at System.Net.WebConnection.Close(Boolean sendNext)
I/mono-stdout(13561): at System.Net.WebConnection.Abort(System.Object sender, System.EventArgs args)
I/mono-stdout(13561): at System.Net.WebConnection+AbortHelper.Abort(System.Object sender, System.EventArgs args)
I/mono-stdout(13561): at System.Net.HttpWebRequest.Abort()
I/mono-stdout(13561): at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.<>m__0(System.Object l)
I/mono-stdout(13561): at System.Threading.CancellationToken+<Register>c__AnonStorey0.<>m__0()
I/mono-stdout(13561): at System.Threading.CancellationTokenSource.Cancel(Boolean throwOnFirstException)
I/mono-stdout(13561): at System.Threading.CancellationTokenSource.Cancel()
I/mono-stdout(13561): at System.Threading.CancellationTokenSource.SafeLinkedCancel()
I/mono-stdout(13561): at System.Threading.CancellationTokenSource.Cancel(Boolean throwOnFirstException)
I/mono-stdout(13561): at System.Threading.CancellationTokenSource.Cancel()
I/mono-stdout(13561): at HttpClientAsyncCancellationRepro.Activity1.CancelButton_Click(System.Object sender, System.EventArgs e)
I/mono-stdout(13561): at Android.Views.View+IOnClickListenerImplementor.OnClick(Android.Views.View v)
I/mono-stdout(13561): at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_(IntPtr jnienv, IntPtr native__this, IntPtr native_v)
I/mono-stdout(13561): at System.Object.e7b5b870-ea0f-434f-bc31-984f665a44ad(IntPtr , IntPtr , IntPtr )
I/mono-stdout(13561): # WebConnection.Write: checking piTrustFailure; from 5 Threadpool worker
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index cf07f57..4c2cfc0 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -421,6 +421,7 @@ namespace System.Net
bool CreateStream (HttpWebRequest request)
{
+ Console.WriteLine ("# WebConnection.CreateStream; from {0} {1}", System.Threading.Thread.CurrentThread.ManagedThreadId, System.Threading.Thread.CurrentThread.Name);
try {
NetworkStream serverStream = new NetworkStream (socket, false);
@@ -1139,6 +1140,7 @@ namespace System.Net
internal bool Write (HttpWebRequest request, byte [] buffer, int offset, int size, ref string err_msg)
{
+ Console.WriteLine ("# WebConnection.Write; from {0} {1}", System.Threading.Thread.CurrentThread.ManagedThreadId, System.Threading.Thread.CurrentThread.Name);
err_msg = null;
Stream s = null;
lock (this) {
@@ -1169,6 +1171,7 @@ namespace System.Net
HttpsClientStream https = (nstream as HttpsClientStream);
if (https.TrustFailure) {
#else
+ Console.WriteLine ("# WebConnection.Write: checking piTrustFailure; from {0} {1}", System.Threading.Thread.CurrentThread.ManagedThreadId, System.Threading.Thread.CurrentThread.Name);
if ((bool) piTrustFailure.GetValue (nstream, null)) {
#endif
wes = WebExceptionStatus.TrustFailure;
@@ -1184,6 +1187,7 @@ namespace System.Net
internal void Close (bool sendNext)
{
+ Console.WriteLine ("# WebConnection.Close; from {0} {1} at {2}", System.Threading.Thread.CurrentThread.ManagedThreadId, System.Threading.Thread.CurrentThread.Name, Environment.StackTrace);
lock (this) {
if (Data != null && Data.request != null && Data.request.ReuseConnection) {
Data.request.ReuseConnection = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment