Skip to content

Commit

Permalink
Throw proper query error if destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Mar 28, 2022
1 parent b3ac644 commit e148a0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cjs/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl

function execute(q) {
if (terminated)
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))

if (q.cancelled)
return
Expand Down
2 changes: 1 addition & 1 deletion deno/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl

function execute(q) {
if (terminated)
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))

if (q.cancelled)
return
Expand Down
2 changes: 1 addition & 1 deletion src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function Connection(options, { onopen = noop, onend = noop, ondrain = noop, oncl

function execute(q) {
if (terminated)
return q.reject(Errors.connection('CONNECTION_DESTROYED', options))
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))

if (q.cancelled)
return
Expand Down

0 comments on commit e148a0a

Please sign in to comment.