Skip to content

Commit 4313803

Browse files
committed
no need to validate, just check for truthyness
1 parent 39d63db commit 4313803

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/client/lib/client/socket.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ export default class RedisSocket extends EventEmitter {
259259
socket.removeListener('timeout', onTimeout);
260260
}
261261

262-
//TODO valiate > 0 -> #validateOptions method should be available with csc PR
263-
if (this.#socketTimeout !== undefined) {
262+
if (this.#socketTimeout) {
264263
socket.setTimeout(this.#socketTimeout);
265264
socket.once('timeout', () => {
266265
socket.destroy(new SocketTimeoutError(this.#socketTimeout!));

0 commit comments

Comments
 (0)