http://www.bradfitz.com/share/mono/AsyncErrorDemo.exe
(This is a minimal test case showing Mono's class library not catching async socket errors.....)
The source is temporarily here:
http://www.bradfitz.com/share/mono/AsyncErrorDemo.cs
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.Socke
in <0x00056> .Worker:Send ()
in <0x00044> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
But I think I found the bug:
mcs-0.29/class/System/System.Net.Sockets/S
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.