Skip to content

Commit e148a0a

Browse files
committed
Throw proper query error if destroyed
1 parent b3ac644 commit e148a0a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cjs/src/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl
145145

146146
function execute(q) {
147147
if (terminated)
148-
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
148+
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
149149

150150
if (q.cancelled)
151151
return

deno/src/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl
148148

149149
function execute(q) {
150150
if (terminated)
151-
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
151+
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
152152

153153
if (q.cancelled)
154154
return

src/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl
145145

146146
function execute(q) {
147147
if (terminated)
148-
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
148+
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
149149

150150
if (q.cancelled)
151151
return

0 commit comments

Comments
 (0)