Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tls: for...of in _tls_wrap.js
  • Loading branch information
trivikr committed Dec 14, 2019
commit 666a4b4dae807887a530a3f3a8415bff6085518d
9 changes: 4 additions & 5 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ function makeMethodProxy(name) {
return this._parent[name].apply(this._parent, args);
};
}
for (let n = 0; n < proxiedMethods.length; n++) {
tls_wrap.TLSWrap.prototype[proxiedMethods[n]] =
makeMethodProxy(proxiedMethods[n]);
for (const proxiedMethod of proxiedMethods) {
tls_wrap.TLSWrap.prototype[proxiedMethod] =
makeMethodProxy(proxiedMethod);
}

tls_wrap.TLSWrap.prototype.close = function close(cb) {
Expand Down Expand Up @@ -1303,8 +1303,7 @@ Server.prototype[EE.captureRejectionSymbol] = function(
function SNICallback(servername, callback) {
const contexts = this.server._contexts;

for (let i = 0; i < contexts.length; i++) {
const elem = contexts[i];
for (const elem of contexts) {
if (elem[0].test(servername)) {
callback(null, elem[1]);
return;
Expand Down