Skip to content

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: #16365
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
c0b authored and MylesBorins committed Oct 23, 2017
1 parent e1cff10 commit 73915d3
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 73915d3

Please sign in to comment.