Skip to content

Commit

Permalink
Don't parse the rest of the OK packet if we're not returning it.
Browse files Browse the repository at this point in the history
Signed-off-by: Bradley Grainger <bgrainger@gmail.com>
  • Loading branch information
bgrainger committed Jul 17, 2024
1 parent aeaf900 commit f5eebef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MySqlConnector/Protocol/Payloads/OkPayload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void Verify(ReadOnlySpan<byte> span, IServerCapabilities serverCap

if (serverCapabilities.SupportsSessionTrack)
{
if (reader.BytesRemaining > 0)
if (reader.BytesRemaining > 0 && createPayload)
{
statusBytes = reader.ReadLengthEncodedByteString(); // human-readable info
while (reader.BytesRemaining > 0)
Expand Down

0 comments on commit f5eebef

Please sign in to comment.