aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/api/http2.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md
index c008a13091..f07c5fb091 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -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