Commit 3c09d1b5 authored by Guy Fraser's avatar Guy Fraser Committed by James M Snell
Browse files

http: replace finish() callback with arrow function

Take advantage of arrow function lexical `this` to avoid defining a
`self = this` var which was only used once.

Code relating to the `finish` event was split in to two areas of the
parent function. Gathered it together to clarify association within the
script.

Fixes: https://github.com/nodejs/node/issues/7295
PR-URL: https://github.com/nodejs/node/pull/7378


Reviewed-By: default avatarStephen Belanger <admin@stephenbelanger.com>
Reviewed-By: default avatarBrian White <mscdex@mscdex.net>
Reviewed-By: default avatarFedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 926707f0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment