Author: dick
Date: 2007-01-20 05:06:54 -0500 (Sat, 20 Jan 2007)
New Revision: 71386
Modified:
trunk/mcs/class/System/System.Net.Sockets/ChangeLog
trunk/mcs/class/System/System.Net.Sockets/Socket.cs
Log:
2007-01-20 Dick Porter <[EMAIL PROTECTED]>
* Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions
thrown from setting default socket options - some platforms might
not support a particular default we're trying to set.
Modified: trunk/mcs/class/System/System.Net.Sockets/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2007-01-20 09:28:34 UTC
(rev 71385)
+++ trunk/mcs/class/System/System.Net.Sockets/ChangeLog 2007-01-20 10:06:54 UTC
(rev 71386)
@@ -1,3 +1,9 @@
+2007-01-20 Dick Porter <[EMAIL PROTECTED]>
+
+ * Socket.cs(SocketDefaults): Catch and ignore any SocketExceptions
+ thrown from setting default socket options - some platforms might
+ not support a particular default we're trying to set.
+
2007-01-11 Dick Porter <[EMAIL PROTECTED]>
* IOControlCode.cs:
Modified: trunk/mcs/class/System/System.Net.Sockets/Socket.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2007-01-20 09:28:34 UTC
(rev 71385)
+++ trunk/mcs/class/System/System.Net.Sockets/Socket.cs 2007-01-20 10:06:54 UTC
(rev 71386)
@@ -688,20 +688,24 @@
private void SocketDefaults ()
{
#if NET_2_0
- if (address_family == AddressFamily.InterNetwork ||
- address_family == AddressFamily.InterNetworkV6) {
- /* This is the default, but it
- * probably has nasty side effects on
- * Linux, as the socket option is
- * kludged by turning on or off PMTU
- * discovery...
- */
- this.DontFragment = false;
+ try {
+ if (address_family ==
AddressFamily.InterNetwork ||
+ address_family ==
AddressFamily.InterNetworkV6) {
+ /* This is the default, but it
+ * probably has nasty side
+ * effects on Linux, as the
+ * socket option is kludged by
+ * turning on or off PMTU
+ * discovery...
+ */
+ this.DontFragment = false;
+ }
+
+ /* Set the same defaults as the MS runtime */
+ this.ReceiveBufferSize = 8192;
+ this.SendBufferSize = 8192;
+ } catch (SocketException) {
}
-
- /* Set the same defaults as the MS runtime */
- this.ReceiveBufferSize = 8192;
- this.SendBufferSize = 8192;
#endif
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches