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

https://bugzilla.novell.com/show_bug.cgi?id=659056#c0


           Summary: Socket.EndSend and EndReceive methods with out
                    SocketError parameter should not throw SocketException
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


Created an attachment (id=404483)
 --> (http://bugzilla.novell.com/attachment.cgi?id=404483)
Sample application demonstrating the issue

User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64;
Trident/5.0)

If the send or receive call fails, the Socket.EndSend(IAsyncResult, out
SocketError) and Socket.EndReceive(IAsyncResult, out SocketError) method
overloads should return that error in the out SocketError parameter, not by
throwing an exception.

On Mono 2.8.1, both these methods do throw a SocketException.

I have attached a patch that fixes this issue.

Reproducible: Always

Steps to Reproduce:
1. Write a program that uses BeginSend/EndSend or BeginReceive/EndReceive,
using the specified overloads.
2. Wait for an error to occur (this can be done simply by having the other side
close the connection you're sending)

The attached client/server sample demonstrates this.
Actual Results:  
The EndSend/EndReceive methods throw a SocketException.

Expected Results:  
The EndSend/EndReceive methods should return the error in the out parameter,
which is the behaviour observed on Microsoft .Net

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to