joyent/node — pull request #6428 by indutny (2013-10-28 10:27:26+00:00)
Title: tls: reuse hostname from underlying net.Socket

When `tls.connect()` is called with `socket` option, it should try to
reuse hostname previously passed to `net.connect()` and only after that
fall back to `'localhost'`.

fix #6409

Suggested reviewer: @isaacs or @bnoordhuis