Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions content/develop/clients/nodejs/produsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ After approximately two minutes, the client logs an error message and terminates
To set a timeout for a connection, use the `connectTimeout` option:
```typescript
const client = createClient({
// setting a 10-second timeout
connectTimeout: 10000 // in milliseconds
socket: {
// setting a 10-second timeout
connectTimeout: 10000 // in milliseconds
}
});
client.on('error', error => console.error('Redis client error:', error));
```
Loading