The documentation for setTimeout() should also explain what this timeout applies to and especially that it does not apply to socket creation.