Skip to content

Commit 73915d3

Browse files
c0bMylesBorins
authored andcommitted
doc: fix http2 example with rstWithCancel
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]>
1 parent e1cff10 commit 73915d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/http2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ const client = http2.connect('http://example.org:8000');
817817
const req = client.request({ ':path': '/' });
818818

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

823823
#### http2stream.state

0 commit comments

Comments
 (0)