1
joaner 2018-06-20 02:07:05 +08:00 1
request 模块的 timeout 只针对建立连接后的超时,可以用 setTimeout(reject..., 3000) 手动关闭超时的请求。
文档上也特意说了:Note that if the underlying TCP connection cannot be established, the OS-wide TCP connection timeout will overrule the timeout option (the default in Linux can be anywhere from 20-120 seconds). |