Skip to content

Commit 3853423

Browse files
authored
DEV: fix JavaScript connection example (#866)
1 parent 7acb028 commit 3853423

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)