Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move AlpnHandle.Free to ReleaseHandle
  • Loading branch information
rzikm committed Mar 7, 2024
commit 542a28bb3293507aa1f9dacd674123cb2a436598
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,6 @@ protected override void Dispose(bool disposing)
_writeBio?.Dispose();
}

if (AlpnHandle.IsAllocated)
{
Interop.Ssl.SslSetData(handle, IntPtr.Zero);
AlpnHandle.Free();
}

base.Dispose(disposing);
}

Expand All @@ -438,6 +432,12 @@ protected override bool ReleaseHandle()

SslContextHandle?.DangerousRelease();

if (AlpnHandle.IsAllocated)
{
Interop.Ssl.SslSetData(handle, IntPtr.Zero);
AlpnHandle.Free();
}

IntPtr h = handle;
SetHandle(IntPtr.Zero);
Interop.Ssl.SslDestroy(h); // will free the handles underlying _readBio and _writeBio
Expand Down