Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
Please ensure that your pull request fulfills these requirements:
master
branchWhat is the purpose of this pull request? (bug fix, enhancement, new feature,...)
Rather bug fix.
What changes did you make?
As for
server.listen
,server.close
(both for HTTP and HTTPS servers, as returned by union) takes an optional callback which is called on completion or error. This patch adds argument forwarding forclose
.Provide some example code that this change will affect, if applicable:
Is there anything you'd like reviewers to focus on?
Well there's no tests, should I somehow write one?
As a side note,
HttpServer.prototype.close
forwards the return value ofthis.server.close
, i.e.this
. ButHttpServer.prototype.listen
does not. I think it should too.Please provide testing instructions, if applicable:
Above code.