Skip to content

Commit

Permalink
fix: fixup for node 8.11.2 (#755)
Browse files Browse the repository at this point in the history
PR-URL: #755
  • Loading branch information
kjin authored May 17, 2018
1 parent 4733a68 commit 807d4ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/plugins/test-trace-http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ describe('test-trace-http2', () => {
// In Node 9.9+, the error handler is not added by default.
s.on('error', () => {});
setTimeout(() => {
if (semver.satisfies(process.version, '>=9.4')) {
// Node 9.4 removed rstWithInternalError() and uses added close().
if (semver.satisfies(process.version, '^8.11||>=9.4')) {
// Node 8.11/9.4 removed rstWithInternalError() in favor of new
// close() function.
s.close(http2.constants.NGHTTP2_INTERNAL_ERROR);
} else {
s.rstWithInternalError();
Expand Down

0 comments on commit 807d4ad

Please sign in to comment.