Browse Source

2004-07-12 Gonzalo Paniagua Javier <[email protected]>

	* Socket.cs: if'ed RemoveReferences calls.

svn path=/trunk/mcs/; revision=31023
Gonzalo Paniagua Javier 21 years ago
parent
commit
0fffd32d9a

+ 4 - 0
mcs/class/System/System.Net.Sockets/ChangeLog

@@ -1,3 +1,7 @@
+2004-07-12 Gonzalo Paniagua Javier <[email protected]>
+
+	* Socket.cs: if'ed RemoveReferences calls.
+
 2004-07-09  Dick Porter  <[email protected]>
 
 	* Socket.cs: Slight tweak to allow unknown objects to be returned

+ 6 - 2
mcs/class/System/System.Net.Sockets/Socket.cs

@@ -1020,7 +1020,9 @@ namespace System.Net.Sockets
 			if (req == null)
 				throw new ArgumentException ("Invalid IAsyncResult", "result");
 
-			RemoveReference (req);
+			if (supportsAsync && socket_type == SocketType.Stream)
+				RemoveReference (req);
+
 			if (!result.IsCompleted)
 				result.AsyncWaitHandle.WaitOne();
 
@@ -1063,7 +1065,9 @@ namespace System.Net.Sockets
 			if (req == null)
 				throw new ArgumentException ("Invalid IAsyncResult", "result");
 
-			RemoveReference (req);
+			if (supportsAsync && socket_type == SocketType.Stream)
+				RemoveReference (req);
+
 			if (!result.IsCompleted)
 				result.AsyncWaitHandle.WaitOne();