Skip to content

Commit b9d7af9

Browse files
committed
http: fix close return value mismatch between doc and implementation
1 parent ec3040f commit b9d7af9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/_http_server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ ObjectSetPrototypeOf(Server, net.Server);
570570
Server.prototype.close = function() {
571571
httpServerPreClose(this);
572572
ReflectApply(net.Server.prototype.close, this, arguments);
573+
return this;
573574
};
574575

575576
Server.prototype[SymbolAsyncDispose] = async function() {

lib/https.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Server.prototype.setTimeout = HttpServer.prototype.setTimeout;
111111
Server.prototype.close = function() {
112112
httpServerPreClose(this);
113113
ReflectApply(tls.Server.prototype.close, this, arguments);
114+
return this;
114115
};
115116

116117
Server.prototype[SymbolAsyncDispose] = async function() {

0 commit comments

Comments
 (0)