Skip to content

Commit

Permalink
Fix regression in CancelAsyncConnections test using Native SNI - repr…
Browse files Browse the repository at this point in the history
…oduced locally (#1226)
  • Loading branch information
cheenamalhotra authored Aug 25, 2021
1 parent 6dde935 commit 2b74ca1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,8 @@ internal void ReadSni(TaskCompletionSource<object> completion)
// Evaluate this condition for MANAGED_SNI. This may not be needed because the network call is happening Async and only the callback can receive a success.
ReadAsyncCallback(IntPtr.Zero, readPacket, 0);

if (!IsPacketEmpty(readPacket))
// Only release packet for Managed SNI as for Native SNI packet is released in finally block.
if (TdsParserStateObjectFactory.UseManagedSNI && !IsPacketEmpty(readPacket))
{
ReleasePacket(readPacket);
}
Expand Down

0 comments on commit 2b74ca1

Please sign in to comment.