summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-11-26 12:02:14 -0800
committerJames M Snell <jasnell@gmail.com>2017-11-28 10:30:55 -0800
commit093a87032984e3279ba585cdb935d4e5f92ebb68 (patch)
tree44efc76d8b88b4d71bd9ccf8f48db3d7bee58f51 /lib
parent973b8e0b151b2a54ef85001030374db6fce3e3cf (diff)
downloadandroid-node-v8-093a87032984e3279ba585cdb935d4e5f92ebb68.tar.gz
android-node-v8-093a87032984e3279ba585cdb935d4e5f92ebb68.tar.bz2
android-node-v8-093a87032984e3279ba585cdb935d4e5f92ebb68.zip
http2: use more descriptive names
PR-URL: https://github.com/nodejs/node/pull/17328 Fixes: https://github.com/nodejs/node/issues/15303 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/http2/core.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index 025b0e3633..78446d2fb6 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -582,15 +582,15 @@ function doShutdown(options) {
function submitShutdown(options) {
const type = this[kType];
debug(`Http2Session ${sessionName(type)}: submitting shutdown request`);
- const fn = doShutdown.bind(this, options);
+ const shutdownFn = doShutdown.bind(this, options);
if (type === NGHTTP2_SESSION_SERVER && options.graceful === true) {
// first send a shutdown notice
this[kHandle].shutdownNotice();
// then, on flip of the event loop, do the actual shutdown
- setImmediate(fn);
+ setImmediate(shutdownFn);
return;
}
- fn();
+ shutdownFn();
}
function finishSessionDestroy(socket) {
@@ -877,12 +877,12 @@ class Http2Session extends EventEmitter {
debug(`Http2Session ${sessionName(this[kType])}: sending settings`);
state.pendingAck++;
- const fn = submitSettings.bind(this, settings);
+ const settingsFn = submitSettings.bind(this, settings);
if (state.connecting) {
- this.once('connect', fn);
+ this.once('connect', settingsFn);
return;
}
- fn();
+ settingsFn();
}
// Destroy the Http2Session
@@ -968,14 +968,14 @@ class Http2Session extends EventEmitter {
this.on('shutdown', callback);
}
- const fn = submitShutdown.bind(this, options);
+ const shutdownFn = submitShutdown.bind(this, options);
if (state.connecting) {
- this.once('connect', fn);
+ this.once('connect', shutdownFn);
return;
}
debug(`Http2Session ${sessionName(type)}: sending shutdown`);
- fn();
+ shutdownFn();
}
_onTimeout() {
@@ -1379,12 +1379,12 @@ class Http2Stream extends Duplex {
if (code < 0 || code > kMaxInt)
throw new errors.RangeError('ERR_OUT_OF_RANGE', 'code');
- const fn = submitRstStream.bind(this, code);
+ const rstStreamFn = submitRstStream.bind(this, code);
if (this[kID] === undefined) {
- this.once('ready', fn);
+ this.once('ready', rstStreamFn);
return;
}
- fn();
+ rstStreamFn();
}
rstWithNoError() {
@@ -1415,12 +1415,12 @@ class Http2Stream extends Duplex {
options = Object.assign({}, options);
validatePriorityOptions(options);
- const fn = submitPriority.bind(this, options);
+ const priorityFn = submitPriority.bind(this, options);
if (this[kID] === undefined) {
- this.once('ready', fn);
+ this.once('ready', priorityFn);
return;
}
- fn();
+ priorityFn();
}
// Called by this.destroy().