Skip to content

Commit 30e2221

Browse files
jasnellevanlucas
authored andcommitted
doc: fix s/rstStream/close in example
PR-URL: #18088 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent 1c81a05 commit 30e2221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ const { NGHTTP2_CANCEL } = http2.constants;
10151015
const req = client.request({ ':path': '/' });
10161016

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

10211021
#### http2stream.state

0 commit comments

Comments
 (0)