[Mono-bugs] [Bug 430040] TcpClient breaks after 1000 consecutive connections

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 25 21:14:02 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=430040

User miguel at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=430040#c1


Miguel de Icaza <miguel at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |miguel at novell.com
             Status|NEW                                             |NEEDINFO
      Info Provider|                                                |webservices at landmarkdigital.com




--- Comment #1 from Miguel de Icaza <miguel at novell.com>  2008-09-25 19:14:00 MDT ---
I tried the following with Mono 2.1, and I am unable to reproduce the problem:

using System.Net.Sockets;
using System.IO;
using System;

class X {
        static void Main ()
        {
                for (int i = 0; i < 100000; i++){
                        var client =  new TcpClient ("localhost", 25);

                        var stream = client.GetStream ();
                        var sw = new StreamWriter (stream);
                        var sr = new StreamReader (stream);
                        sw.Write ("QUIT\r\n");
                        sw.Flush ();
                        var s = sr.ReadToEnd ();
                        Console.WriteLine ("Request: {0}, got: {1}", i, s);
                        client.Close ();
                }
        }
}

Did you forget to call TcpClient.Close perhaps?

I tested this with Mono 2.0 RC 3 and Mono 2.1 r114049


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list