Skip to content

Commit 8150005

Browse files
committed
Fix potential endless loop
1 parent 591d47a commit 8150005

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,11 @@ function Postgres(a, b) {
160160
, x
161161

162162
while ((x = queries.peek()) && (c = x.query && x.query.connection || getConnection(queries.peek().fn)) && queries.shift()) {
163-
x.query && x.query.connection && x.query.writable && (c.blocked = true)
164163
x.fn
165164
? transaction(x, c)
166165
: send(c, x.query, x.xs, x.args)
166+
167+
x.query && x.query.connection && x.query.writable && (c.blocked = true)
167168
}
168169
}
169170

0 commit comments

Comments
 (0)