Skip to content

Commit acb85e7

Browse files
committed
fix: clean up reader/writer/socket in proper order
1 parent 5b6c6e2 commit acb85e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ export class RedisClient {
267267
this.#connection = null;
268268
this.#writeLock = Promise.resolve();
269269

270-
await connection.socket.close();
271-
await connection.writer.abort(err);
272270
await connection.reader.cancel(err);
271+
await connection.writer.abort(err);
272+
await connection.socket.close();
273273
}
274274

275275
public async closeSubscriptions() {

0 commit comments

Comments
 (0)