https: implement https.Server#setTimeout()

Like commit d258fb0 ("http: More useful setTimeout API on server") but
this time for the https module.

Fixes #5361.
This commit is contained in:
Ben Noordhuis
2013-04-30 12:43:32 +02:00
parent c081809344
commit ab518e8831
3 changed files with 221 additions and 2 deletions

View File

@@ -43,12 +43,13 @@ function Server(opts, requestListener) {
this.addListener('clientError', function(err, conn) {
conn.destroy(err);
});
this.timeout = 2 * 60 * 1000;
}
inherits(Server, tls.Server);
exports.Server = Server;
Server.prototype.setTimeout = http.Server.prototype.setTimeout;
exports.createServer = function(opts, requestListener) {
return new Server(opts, requestListener);