diff options
author | cjihrig <cjihrig@gmail.com> | 2019-02-20 10:47:40 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-02-22 13:39:21 -0500 |
commit | a1d05e49fee4881150c6f62bf19706f4ca75edf6 (patch) | |
tree | 6ea5a2ae685a6cd04c7667f076aa632d0da56b78 /lib/_http_client.js | |
parent | 4804a18812b95bd63e7a04df9770640f7054ae57 (diff) | |
download | android-node-v8-a1d05e49fee4881150c6f62bf19706f4ca75edf6.tar.gz android-node-v8-a1d05e49fee4881150c6f62bf19706f4ca75edf6.tar.bz2 android-node-v8-a1d05e49fee4881150c6f62bf19706f4ca75edf6.zip |
timers: support name in validateTimerDuration()
Allow passing a name to validateTimerDuration() so that error
messages can reflect the name of the thing being validated.
PR-URL: https://github.com/nodejs/node/pull/26215
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/_http_client.js')
-rw-r--r-- | lib/_http_client.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_http_client.js b/lib/_http_client.js index 93d07c4d7d..e073e973bb 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -737,7 +737,7 @@ ClientRequest.prototype.setTimeout = function setTimeout(msecs, callback) { } listenSocketTimeout(this); - msecs = validateTimerDuration(msecs); + msecs = validateTimerDuration(msecs, 'msecs'); if (callback) this.once('timeout', callback); if (this.socket) { |