Skip to content

Commit 45b2873

Browse files
committed
ReadyForQueryMessage transaction
1 parent 3fe22bd commit 45b2873

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/src/connection_fsm.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,12 @@ class _PostgreSQLConnectionStateBusy extends _PostgreSQLConnectionState {
255255
// print("(${query.statement}) -> $message");
256256

257257
if (message is ReadyForQueryMessage) {
258+
if (message.state == ReadyForQueryMessage.StateTransactionError) {
259+
query.completeError(returningException!);
260+
return _PostgreSQLConnectionStateReadyInTransaction(
261+
query.transaction as _TransactionProxy);
262+
}
258263
if (returningException != null) {
259-
if (message.state == ReadyForQueryMessage.StateTransactionError) {
260-
query.completeError(returningException!);
261-
return _PostgreSQLConnectionStateReadyInTransaction(
262-
query.transaction as _TransactionProxy);
263-
}
264264
query.completeError(returningException!);
265265
} else {
266266
query.complete(rowsAffected);

0 commit comments

Comments
 (0)