Skip to content

Commit

Permalink
always set isOpen to false in socket disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
pixtron committed Feb 27, 2022
1 parent ac7d50c commit b5360c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/client/lib/client/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ export default class RedisSocket extends EventEmitter {
}

disconnect(): void {
this.#isOpen = this.#isReady = false;

if (!this.#socket) {
throw new ClientClosedError();
} else {
this.#isOpen = this.#isReady = false;
}

this.#socket.destroy();
Expand Down

0 comments on commit b5360c0

Please sign in to comment.