diff options
author | Daniel Beckert <drbeckert@gmail.com> | 2018-12-13 15:35:48 -0200 |
---|---|---|
committer | Matheus Marchini <mat@mmarchini.me> | 2019-04-22 11:51:46 -0700 |
commit | ece507394a563bd7e3555a840a3d6980ffbb01ac (patch) | |
tree | 1d06fac01c1ca69e88107f718d12859f78a55295 /test/async-hooks/test-httpparser.response.js | |
parent | 5aaf666b3b82a66485bea6a6b59fbfc838192e2f (diff) | |
download | android-node-v8-ece507394a563bd7e3555a840a3d6980ffbb01ac.tar.gz android-node-v8-ece507394a563bd7e3555a840a3d6980ffbb01ac.tar.bz2 android-node-v8-ece507394a563bd7e3555a840a3d6980ffbb01ac.zip |
src: do not reuse async resource in http parsers
Change resource being used, previously HTTParser was being reused.
We are now using IncomingMessage and ClientRequest objects. The goal
here is to make the async resource unique for each async operatio
Refs: https://github.com/nodejs/node/pull/24330
Refs: https://github.com/nodejs/diagnostics/issues/248
Refs: https://github.com/nodejs/node/pull/21313
Co-authored-by: Matheus Marchini <mat@mmarchini.me>
PR-URL: https://github.com/nodejs/node/pull/25094
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/async-hooks/test-httpparser.response.js')
-rw-r--r-- | test/async-hooks/test-httpparser.response.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/async-hooks/test-httpparser.response.js b/test/async-hooks/test-httpparser.response.js index 5933b61b79..85d6f76525 100644 --- a/test/async-hooks/test-httpparser.response.js +++ b/test/async-hooks/test-httpparser.response.js @@ -26,7 +26,7 @@ const request = Buffer.from( ); const parser = new HTTPParser(RESPONSE); -const as = hooks.activitiesOfTypes('HTTPPARSER'); +const as = hooks.activitiesOfTypes('HTTPCLIENTREQUEST'); const httpparser = as[0]; assert.strictEqual(as.length, 1); @@ -58,7 +58,7 @@ process.on('exit', onexit); function onexit() { hooks.disable(); - hooks.sanityCheck('HTTPPARSER'); + hooks.sanityCheck('HTTPCLIENTREQUEST'); checkInvocations(httpparser, { init: 1, before: 2, after: 2, destroy: 1 }, 'when process exits'); } |