// Important: WinHttp API calls should not happen while another WinHttp call for the same handle did not // return. During finalization that was not initiated by the Dispose pattern we don't expect any other WinHttp // calls in progress. protected override bool ReleaseHandle() { if (_parentHandle != null) { _parentHandle.DangerousRelease(); _parentHandle = null; } return(Interop.WinHttp.WinHttpCloseHandle(handle)); }
// Important: WinHttp API calls should not happen while another WinHttp call for the same handle did not // return. During finalization that was not initiated by the Dispose pattern we don't expect any other WinHttp // calls in progress. protected override bool ReleaseHandle() { if (_parentHandle != null) { _parentHandle.DangerousRelease(); _parentHandle = null; } // TODO(Issue 2500): Add logging so we know when the handle gets closed. return(Interop.WinHttp.WinHttpCloseHandle(handle)); }