diff options
author | 龙腾道 <LongTengDao@LongTengDao.com> | 2020-04-08 18:43:30 +0300 |
---|---|---|
committer | himself65 <himself65@outlook.com> | 2020-04-11 07:22:12 +0300 |
commit | 4439009d6531230f2f15992483d136bcc416c6ae (patch) | |
tree | e704e822c2d8636325e9687971cb8726a7fd51ba /lib/internal/stream_base_commons.js | |
parent | 153524300829565b43635efa11a67bde90b99854 (diff) |
lib: fix return type of setTimeout in net.Socket
Function setTimeout in net.Socket should return this,
not undefined, as doc said.
PR-URL: https://github.com/nodejs/node/pull/32722
Refs: https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/internal/stream_base_commons.js')
-rw-r--r-- | lib/internal/stream_base_commons.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/stream_base_commons.js b/lib/internal/stream_base_commons.js index 0278e7240c3..31f1ba67f13 100644 --- a/lib/internal/stream_base_commons.js +++ b/lib/internal/stream_base_commons.js @@ -238,7 +238,7 @@ function onStreamRead(arrayBuffer) { function setStreamTimeout(msecs, callback) { if (this.destroyed) - return; + return this; this.timeout = msecs; |