Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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()`. PR-URL: #19425 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
- Loading branch information