Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
themez committed Oct 12, 2019
commit ebf41bfe36332d208fe359fbeefbd0f03d0bdccb
6 changes: 3 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ might be reused. But if server closes connection at unfortunate time, client
may run into a 'ECONNRESET' error.

```js
const http = require('http')
const http = require('http');

// Server has a 5 seconds keep-alive timeout by default
http
Expand All @@ -702,10 +702,10 @@ http
setInterval(() => {
// Adapting a keep-alive agent
http.get('http://localhost:3000', { agent }, (res) => {
res.on('data', data => {
res.on('data', (data) => {
// Do nothing
});
})
});
}, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
```

Expand Down