tls: use parent handle's close callback
authorFedor Indutny <fedor@indutny.com>
Mon, 21 Sep 2015 23:22:26 +0000 (19:22 -0400)
committerJames M Snell <jasnell@gmail.com>
Mon, 12 Oct 2015 17:32:14 +0000 (10:32 -0700)
commitaf10df6108513464b2c30587e53738905763d291
treeea1eceb4a0c120a690637e1caef88e339d54f770
parent01cb3fc36b0ca5f6e24ccb47915487e7c6a0e609
tls: use parent handle's close callback

When closing the child TLSWrap handle - wait for the proper parent's
handle close callback invocation. `uv_close_cb` may be invoked much
later than the next libuv tick, depending on the platform.

The only platform that currently seem to defer `uv_close_cb` is Windows
XP. This behavior was not observed on other Windows systems, and is not
possible on Unixes.

Fix: https://github.com/nodejs/node/issues/2979
PR-URL: https://github.com/nodejs/node/pull/2991
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
lib/_tls_wrap.js