[Mono-bugs] [Bug 39075][Wis] New - ChannelServices.Unregisterchannel

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 4 Mar 2003 18:48:38 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jean-marc.andre@polymtl.ca.

http://bugzilla.ximian.com/show_bug.cgi?id=39075

--- shadow/39075	Tue Mar  4 18:48:38 2003
+++ shadow/39075.tmp.21957	Tue Mar  4 18:48:38 2003
@@ -0,0 +1,72 @@
+Bug#: 39075
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: Red Hat 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jean-marc.andre@polymtl.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ChannelServices.Unregisterchannel
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When ChannelServices.UnregisterChannel is called with a previously
+registered TcpChannel, it seems that the .NET Framework releases the
+associated port. Mono doesn't.
+
+
+Steps to reproduce the problem:
+1. Build and run the following code with both windows and mono
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace UnregisterChannel
+{
+	public class UnregisterChannel
+	{
+		public static void Main()
+		{
+			TcpChannel chn = new TcpChannel(1234);
+			ChannelServices.RegisterChannel(chn);
+			Console.WriteLine("chn is registered");
+			ChannelServices.UnregisterChannel(chn);
+			Console.WriteLine("chn is unregistered");
+			chn = new TcpChannel(1234);
+			ChannelServices.RegisterChannel(chn);
+			Console.WriteLine("chn is registered");
+			ChannelServices.UnregisterChannel(chn);
+			Console.WriteLine("chn is unregistered");
+		}
+	}
+}
+
+2. 
+3. 
+
+Actual Results:
+chn is registered
+chn is unregistered
+System.Net.Sockets.SocketException: Address already in use
+
+Expected Results:
+chn is registered
+chn is unregistered
+chn is registered
+chn is unregistered
+
+
+How often does this happen? 
+Always
+
+Additional Information: