Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

need windows tester

Can somebody run this program on Windows and copy/paste me what it displays?

(This is a minimal test case showing Mono's class library not catching async socket errors.....)

The source is temporarily here:

What you shouldn't see is:

$ ./AsyncErrorDemo.exe
server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

Unhandled Exception: System.Net.Sockets.SocketException: The socket has been shut down
in <0x00102> System.Net.Sockets.Socket:Send (byte[],int,int,System.Net.Sockets.SocketFlags)
in <0x00056> .Worker:Send ()
in <0x00044> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

But I think I found the bug:


BeginSend makes a worker thread, with threadstart of Worker.Send. But Worker.Send doesn't catch or save the Exception, so EndSend can't rethrow it. Looks like an easy enough fix. Now I just gotta learn how to build this beast.

I'm really enjoying both Mono and C#.

I need to get vmware working again.
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.