Skip to content

Commit

Permalink
doc: fix s/rstStream/close in example
Browse files Browse the repository at this point in the history
PR-URL: #18088
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
jasnell committed Jan 11, 2018
1 parent 078b7a2 commit 47a2822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ const { NGHTTP2_CANCEL } = http2.constants;
const req = client.request({ ':path': '/' });

// Cancel the stream if there's no activity after 5 seconds
req.setTimeout(5000, () => req.rstStream(NGHTTP2_CANCEL));
req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
```

#### http2stream.state
Expand Down

0 comments on commit 47a2822

Please sign in to comment.