summaryrefslogtreecommitdiff
path: root/lib/internal/http2/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/http2/core.js')
-rw-r--r--lib/internal/http2/core.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index 400db84b56..fc99b50eae 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -1821,7 +1821,9 @@ class Http2Stream extends Duplex {
req.oncomplete = afterShutdown;
req.callback = cb;
req.handle = handle;
- handle.shutdown(req);
+ const err = handle.shutdown(req);
+ if (err === 1) // synchronous finish
+ return afterShutdown.call(req, 0);
} else {
cb();
}