-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
I believe I have discovered a memory leak in Http.Async.cs
void SetTimeout(IAsyncResult asyncResult)
{
if (Timeout != 0)
ThreadPool.RegisterWaitForSingleObject(
asyncResult.AsyncWaitHandle,
TimeoutCallback, _timeoutState, Timeout, true
);
static void TimeoutCallback(object state, bool timedOut)
{
if (!timedOut)
return;
if (!(state is TimeOutState tos))
return;
lock (tos) tos.TimedOut = true;
tos.Request?.Abort();
}
}
The handle In the call to ThreadPool.RegisterWaitForSingleObject is not saved and handle.Unregister is never called.
My ANTS Memory Profiler is showing the leak.
Specifications
- Version: 106.10.1
- Platform: Win x64
Metadata
Metadata
Assignees
Labels
No labels