Skip to content

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading