2010-05-21 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 21 May 2010 03:20:23 +0000 (03:20 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 21 May 2010 03:20:23 +0000 (03:20 -0000)
* HttpListenerManager.cs : add a workaround for Func<>.BeginInvoke()
  problem that blocked ASP.NET channels working.

svn path=/trunk/mcs/; revision=157658

mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs

index 4b16a1c458a733ae82d469db3588ae82ee03ddbd..4bd100163e454131327239458f03f88f58f04c07 100755 (executable)
@@ -1,3 +1,8 @@
+2010-05-21  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * HttpListenerManager.cs : add a workaround for Func<>.BeginInvoke()
+         problem that blocked ASP.NET channels working.
+
 2010-05-19  Andreia Gaita  <avidigal@novell.com>
 
        * HttpRequestChannel.cs: if the response has no body, create an
index 4e26602b94dcdbc09af6008d1e1170e4be355a01..19d251d1df344719ecc5b38de8f5f106901010a1 100644 (file)
@@ -236,10 +236,17 @@ namespace System.ServiceModel.Channels
                {
                        if (wait_delegate == null)
                                wait_delegate = new Func<IChannelListener,HttpContext> (http_handler.WaitForRequest);
+// FIXME: Remove this workaround. This Func<>.BeginInvoke() invocation
+// somehow fails and does not kick this method asynchronously.
+#if false
                        wait_delegate.BeginInvoke (listener, delegate (IAsyncResult result) {
                                var ctx = wait_delegate.EndInvoke (result);
                                contextReceivedCallback (ctx != null ? new AspNetHttpContextInfo (ctx) : null);
                                }, null);
+#else
+                       var ctx = wait_delegate.Invoke (listener);
+                               contextReceivedCallback (ctx != null ? new AspNetHttpContextInfo (ctx) : null);
+#endif
                }
        }