Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
docs: http: fix docs for the 'close' event
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 2, 2011
1 parent edea412 commit 672b453
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions doc/api/http.markdown
Expand Up @@ -46,7 +46,7 @@ per connection (in the case of keep-alive connections).

### Event: 'close'

`function (errno) { }`
`function () { }`

Emitted when the server closes.

Expand Down Expand Up @@ -147,20 +147,11 @@ will be emitted on the request.

### Event: 'close'

`function (err) { }`
`function () { }`

Indicates that the underlaying connection was terminated before
`response.end()` was called or able to flush.

The `err` parameter is always present and indicates the reason for the timeout:

`err.code === 'timeout'` indicates that the underlaying connection timed out.
This may happen because all incoming connections have a default timeout of 2
minutes.

`err.code === 'aborted'` means that the client has closed the underlaying
connection prematurely.

Just like `'end'`, this event occurs only once per request, and no more `'data'`
events will fire afterwards.

Expand Down

0 comments on commit 672b453

Please sign in to comment.