You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library in an application where a client might stay in a reconnection state over several days. The built in reconnection logic calls the WebsocketClient.StartClient method recursively. This leads to a steady increase in memory allocation after each reconnect attempt
The following code snippet creates 10 000 clients which reconnects every 100 milliseconds. It is not a real life scenario, but it demonstrates the issue.
It managed to allocate 600MB in 30 sek
thank you for reporting this with the useful code snippet.
I have broken the recursive call by introducing an error timer, and it seems to solve the problem nicely here: df2e007
Hi,
I am using this library in an application where a client might stay in a reconnection state over several days. The built in reconnection logic calls the
WebsocketClient.StartClient
method recursively. This leads to a steady increase in memory allocation after each reconnect attemptThe following code snippet creates 10 000 clients which reconnects every 100 milliseconds. It is not a real life scenario, but it demonstrates the issue.
It managed to allocate 600MB in 30 sek
The text was updated successfully, but these errors were encountered: