diff --git a/src/async-wrap.h b/src/async-wrap.h index 50d4f626ede151..235828f36e8350 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -60,7 +60,7 @@ namespace node { #if HAVE_OPENSSL #define NODE_ASYNC_CRYPTO_PROVIDER_TYPES(V) \ - V(CONNECTION) \ + V(SSLCONNECTION) \ V(PBKDF2REQUEST) \ V(RANDOMBYTESREQUEST) \ V(TLSWRAP) diff --git a/src/node_crypto.h b/src/node_crypto.h index ad1b493596aa7a..bd5ed517c5e500 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -402,7 +402,7 @@ class Connection : public AsyncWrap, public SSLWrap { v8::Local wrap, SecureContext* sc, SSLWrap::Kind kind) - : AsyncWrap(env, wrap, AsyncWrap::PROVIDER_CONNECTION), + : AsyncWrap(env, wrap, AsyncWrap::PROVIDER_SSLCONNECTION), SSLWrap(env, sc, kind), bio_read_(nullptr), bio_write_(nullptr), diff --git a/test/async-hooks/test-connection.ssl.js b/test/async-hooks/test-connection.ssl.js index 69e31d85df09fc..13a2967e0df74b 100644 --- a/test/async-hooks/test-connection.ssl.js +++ b/test/async-hooks/test-connection.ssl.js @@ -37,11 +37,11 @@ function createServerConnection( // creating first server connection const sc1 = createServerConnection(common.mustCall(onfirstHandShake)); -let as = hooks.activitiesOfTypes('CONNECTION'); +let as = hooks.activitiesOfTypes('SSLCONNECTION'); assert.strictEqual(as.length, 1, 'one CONNECTION after first connection created'); const f1 = as[0]; -assert.strictEqual(f1.type, 'CONNECTION', 'connection'); +assert.strictEqual(f1.type, 'SSLCONNECTION', 'connection'); assert.strictEqual(typeof f1.uid, 'number', 'uid is a number'); assert.strictEqual(typeof f1.triggerId, 'number', 'triggerId is a number'); checkInvocations(f1, { init: 1 }, 'first connection, when first created'); @@ -49,11 +49,11 @@ checkInvocations(f1, { init: 1 }, 'first connection, when first created'); // creating second server connection const sc2 = createServerConnection(common.mustCall(onsecondHandShake)); -as = hooks.activitiesOfTypes('CONNECTION'); +as = hooks.activitiesOfTypes('SSLCONNECTION'); assert.strictEqual(as.length, 2, - 'two CONNECTIONs after second connection created'); + 'two SSLCONNECTIONs after second connection created'); const f2 = as[1]; -assert.strictEqual(f2.type, 'CONNECTION', 'connection'); +assert.strictEqual(f2.type, 'SSLCONNECTION', 'connection'); assert.strictEqual(typeof f2.uid, 'number', 'uid is a number'); assert.strictEqual(typeof f2.triggerId, 'number', 'triggerId is a number'); checkInvocations(f1, { init: 1 }, 'first connection, when second created'); @@ -81,7 +81,7 @@ process.on('exit', onexit); function onexit() { hooks.disable(); - hooks.sanityCheck('CONNECTION'); + hooks.sanityCheck('SSLCONNECTION'); checkInvocations(f1, { init: 1, before: 1, after: 1 }, 'first connection, when process exits');