Quobject/EngineIoClientDotNet

Memory and thread leak

men232 opened this issue · 1 comments

Hi, i'm using SocketIoClientDotNet for .Net 4.0 and .Net 3.5 and i have some problems. This example code make memory and thread leak. After, you can see, how app opens a new thread and consumes more memory...

// Client
var opts = new IO.Options();
opts.Cookies.Add("test", "1");
opts.Reconnection = true;

var m_manager = new Manager(new Uri("http://mysite.com"), opts);
var socket = m_manager.Socket("/test");

socket.On(Socket.EVENT_CONNECT, () =>
{
    socket.Emit("hi");

});

socket.On("hi", (data) =>
{
    Console.WriteLine(data);
});

socket.On("statistic", (data) =>
{
    socket.Emit("statistic");
    Console.WriteLine(data);
});

Console.ReadLine();
// Scoket.IO Server
setInterval(function() {
    socket.emit('statistic', 'full');
}, 100);

This bug only in .NET 3.5

can confirm the memory leak is happening.