Skip to content

Commit 9bc0997

Browse files
committed
DEV: fix JavaScript connection example
1 parent 8675ca5 commit 9bc0997

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/develop/clients/nodejs/produsage.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ After approximately two minutes, the client logs an error message and terminates
7777
To set a timeout for a connection, use the `connectTimeout` option:
7878
```typescript
7979
const client = createClient({
80-
// setting a 10-second timeout
81-
connectTimeout: 10000 // in milliseconds
80+
socket: {
81+
// setting a 10-second timeout
82+
connectTimeout: 10000 // in milliseconds
83+
}
8284
});
8385
client.on('error', error => console.error('Redis client error:', error));
8486
```

0 commit comments

Comments
 (0)