Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory and thread leak #13

Open
men232 opened this issue Aug 24, 2015 · 1 comment
Open

Memory and thread leak #13

men232 opened this issue Aug 24, 2015 · 1 comment
Labels

Comments

@men232
Copy link

men232 commented Aug 24, 2015

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

@TeqTankTaylor
Copy link

can confirm the memory leak is happening.

@mattqs mattqs added the bug label Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants