We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1480c9f commit 9eeca9dCopy full SHA for 9eeca9d
src/connection/sqlJob.ts
@@ -105,7 +105,7 @@ export class OldSQLJob extends SQLJob {
105
getStatus(): JobStatus {
106
const currentListenerCount = this.responseEmitter.eventNames().length;
107
108
- return currentListenerCount > 0 ? "busy" : this.status;
+ return this.channel && currentListenerCount > 0 ? "busy" : this.status;
109
}
110
111
async connect(): Promise<ConnectionResult> {
@@ -208,6 +208,7 @@ export class OldSQLJob extends SQLJob {
208
209
dispose() {
210
this.channel.close();
211
+ this.channel = undefined;
212
this.status = "ended";
213
214
0 commit comments