diff options
author | Pieter Mees <pieter.mees@zentrick.com> | 2018-04-09 15:19:59 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-05-15 14:01:37 -0400 |
commit | 1455b1dec2490046e5dc65d6f322d63e67e09757 (patch) | |
tree | dfac8ff159438d1d49c3664d5ab6d7b50969606a /lib | |
parent | 165d214a5464473800c07684b2727d1c5fc57b5f (diff) | |
download | node-new-1455b1dec2490046e5dc65d6f322d63e67e09757.tar.gz |
http2: emit session connect on next tick
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/http2/core.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 09f1f993c3..cbaf908246 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -731,7 +731,7 @@ function setupHandle(socket, type, options) { // core will check for session.destroyed before progressing, this // ensures that those at l`east get cleared out. if (this.destroyed) { - this.emit('connect', this, socket); + process.nextTick(emit, this, 'connect', this, socket); return; } debug(`Http2Session ${sessionName(type)}: setting up session handle`); @@ -773,7 +773,7 @@ function setupHandle(socket, type, options) { options.settings : {}; this.settings(settings); - this.emit('connect', this, socket); + process.nextTick(emit, this, 'connect', this, socket); } // Emits a close event followed by an error event if err is truthy. Used |