(socket: NodeRedisClientOptions["socket"], signal: AbortSignal)
| 42 | // node-redis cannot destroy a socket that is still connecting, so every |
| 43 | // client gets a socket signal that `destroy` aborts. |
| 44 | const withSignal = (socket: NodeRedisClientOptions["socket"], signal: AbortSignal) => { |
| 45 | // node-redis' TLS option type omits `signal`, which `tls.connect` accepts. |
| 46 | const callerSignal = socket && "signal" in socket ? socket.signal : undefined |
| 47 | return { ...socket, signal: callerSignal ? AbortSignal.any([callerSignal, signal]) : signal } |
| 48 | } |
| 49 | |
| 50 | const makeSocket = ( |
| 51 | socket: NodeRedisClientOptions["socket"], |
no test coverage detected