Skip to content

[6.x] http: make socketPath work with no agent

Currently Agent.prototype.createConnection() is called uncoditionally if the socketPath option is used. This throws an error if no agent is used, preventing, for example, the socketPath and createConnection options to be used together.

This commit fixes the issue by falling back to the createConnection option or net.createConnection().

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