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
We have a web socket server that is sending live data to connected clients.
We are leaking large amounts of memory when I add the calls to IWebSocketConnection.Send
This could be due to how we are using the socket, but I wanted to know if there is a known issue with sending large amounts of data from the server?
public void Start(CancellationToken stoppingToken)
{
Task.Run(async () =>
{
while (!stoppingToken.IsCancellationRequested)
{
// read from each queue and send
if (_binaryMessageQueue.TryDequeue(out var binaryMessage))
{
await Socket.Send(binaryMessage).ConfigureAwait(false);
}
if (_textMessageQueue.TryDequeue(out var textMessage))
{
await Socket.Send(textMessage).ConfigureAwait(false);
}
if (_binaryMessageQueue.IsEmpty && _textMessageQueue.IsEmpty)
{
await Task.Delay(10, stoppingToken).ConfigureAwait(false);
}
}
}, stoppingToken);
}
The text was updated successfully, but these errors were encountered:
@wade-dp Any updates to this? Plan to use this for a project but memory leaks overtime is not ideal, PerfMon should help figure out where the memory leak is if ones exists.
We have a web socket server that is sending live data to connected clients.
We are leaking large amounts of memory when I add the calls to IWebSocketConnection.Send
This could be due to how we are using the socket, but I wanted to know if there is a known issue with sending large amounts of data from the server?
The text was updated successfully, but these errors were encountered: