Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
doc: fix http2 example with rstWithCancel
Browse files Browse the repository at this point in the history
Replace the non-existent method rstStreamWithCancel with rstWithCancel

PR-URL: nodejs/node#16365
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
c0b authored and addaleax committed Oct 26, 2017
1 parent 2603b69 commit 3864209
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 @@ -817,7 +817,7 @@ const client = http2.connect('http://example.org:8000');
const req = client.request({ ':path': '/' });

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

#### http2stream.state
Expand Down

0 comments on commit 3864209

Please sign in to comment.