[Mono-bugs] [Bug 465823] New: ObjectDisposedException printed to the Console in HttpListener

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 13 14:42:44 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=465823


           Summary: ObjectDisposedException printed to the Console in
                    HttpListener
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bassam at symform.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1;
NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.20706; .NET
CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

ObjectDisposedExection is printed to the Console when calling
HttpListenerConext.Response.Close(). A quick at the code in
HttpConnection.OnRead() reveals the problem:

private void OnRead(IAsyncResult ares)
{
    HttpConnection asyncState = (HttpConnection) ares.AsyncState;
    int count = -1;
    try
    {
        count = this.stream.EndRead(ares);
        this.ms.Write(this.buffer, 0, count);
    }
    catch (Exception exception)
    {
        Console.WriteLine(exception);  <-- this will print harmless exception
        if (this.ms.Length > 0L)
        {
            this.SendError();
        }
        this.sock.Close();
        return;
    }


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Exception printed to Console.

Expected Results:  
ObjectDisposedException should be caught and ignored.
No exceptions should be logged to the console.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list