Skip to content

Commit 037ecb0

Browse files
committed
Fix cancellation being able to cancel prepended queries (#4907)
Fixes #4906 (cherry picked from commit 218a160)
1 parent 13d9f36 commit 037ecb0

File tree

5 files changed

+261
-119
lines changed

5 files changed

+261
-119
lines changed

src/Npgsql/NpgsqlCommand.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,7 @@ internal async ValueTask<NpgsqlDataReader> ExecuteReader(CommandBehavior behavio
12211221
NpgsqlEventSource.Log.CommandStart(CommandText);
12221222

12231223
// If a cancellation is in progress, wait for it to "complete" before proceeding (#615)
1224-
lock (connector.CancelLock)
1225-
{
1226-
}
1224+
connector.ResetCancellation();
12271225

12281226
// We do not wait for the entire send to complete before proceeding to reading -
12291227
// the sending continues in parallel with the user's reading. Waiting for the

0 commit comments

Comments
 (0)