[Mono-dev] System.ServiceModel.ServiceHost exception

Josh Abbott josh.k.abbott at gmail.com
Mon Jun 11 17:07:00 UTC 2012


I also had the problem in mono-2.11.1

Solved with the following patch (also as attachment)
---------------------------------------
*** HttpListenerManager.cs      2012-06-11 17:58:34.000000000 +0100
--- HttpListenerManager.cs.ORIG 2012-06-11 17:55:46.000000000 +0100
***************
*** 96,108 ****
                        lock (ce.RetrieverLock) {
                                var q = ce.ContextQueue;
                                if (q.Count == 0) {
!                                       bool ret = false;
!                                       try {
!                                               ret =
ce.WaitHandle.WaitOne (timeout);
!                                       }
!                                       catch (Exception) {
!                                               ret = false;
!                                       }
                                        return ret &&
TryDequeueRequest (channel, timeout - (DateTime.Now - start), out
context); // recurse, am lazy :/
                                }
                                context = q.Dequeue ();
--- 96,102 ----
                        lock (ce.RetrieverLock) {
                                var q = ce.ContextQueue;
                                if (q.Count == 0) {
!                                       bool ret =
ce.WaitHandle.WaitOne (timeout);
                                        return ret &&
TryDequeueRequest (channel, timeout - (DateTime.Now - start), out
context); // recurse, am lazy :/
                                }
                                context = q.Dequeue ();
---------------------------------------

On Thu, Mar 29, 2012 at 9:54 AM, salorob <r.salomons at trisal.nl> wrote:
> i have this too.. ?
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/System-ServiceModel-ServiceHost-exception-tp4485334p4514850.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
*** HttpListenerManager.cs      2012-06-11 17:58:34.000000000 +0100
--- HttpListenerManager.cs.ORIG 2012-06-11 17:55:46.000000000 +0100
***************
*** 96,108 ****
                        lock (ce.RetrieverLock) {
                                var q = ce.ContextQueue;
                                if (q.Count == 0) {
!                                       bool ret = false;
!                                       try {
!                                               ret = ce.WaitHandle.WaitOne (timeout);
!                                       }
!                                       catch (System.ArgumentOutOfRangeException) {
!                                               ret = false;
!                                       }
                                        return ret && TryDequeueRequest (channel, timeout - (DateTime.Now - start), out context); // recurse, am lazy :/
                                }
                                context = q.Dequeue ();
--- 96,102 ----
                        lock (ce.RetrieverLock) {
                                var q = ce.ContextQueue;
                                if (q.Count == 0) {
!                                       bool ret = ce.WaitHandle.WaitOne (timeout);
                                        return ret && TryDequeueRequest (channel, timeout - (DateTime.Now - start), out context); // recurse, am lazy :/
                                }
                                context = q.Dequeue ();


More information about the Mono-devel-list mailing list