http: make timeout event work with agent timeout · nodejs/node@25c19eb · GitHub
Skip to content

Commit 25c19eb

Browse files
lpincaaddaleax
authored andcommitted
http: make timeout event work with agent timeout
The `'timeout'` event is currently not emitted on the `ClientRequest` instance when the socket timeout expires if only the `timeout` option of the agent is set. This happens because, under these circumstances, `listenSocketTimeout()` is not called. This commit fixes the issue by calling it also when only the agent `timeout` option is set. PR-URL: #25488 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b779c07 commit 25c19eb

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

lib/_http_client.js

Lines changed: 4 additions & 1 deletion
Lines changed: 23 additions & 0 deletions

0 commit comments

Comments
 (0)