net: unref timer in parent sockets
authorFedor Indutny <fedor@indutny.com>
Thu, 19 Feb 2015 13:14:36 +0000 (14:14 +0100)
committerFedor Indutny <fedor@indutny.com>
Thu, 19 Feb 2015 17:44:10 +0000 (18:44 +0100)
commit9b6b05556f7684db396376f682f8042685a5b2b6
treed0b91c0f35c9fc51eada1d8c5c9cea4bcc212570
parentecef87177ac44d0840ec001aad0921824a2a13ec
net: unref timer in parent sockets

`TLSSocket` wraps the original `net.Socket`, but writes/reads to/from
`TLSSocket` do not touch the timers of original `net.Socket`.

Introduce `socket._parent` property, and iterate through all parents
to unref timers and prevent timeout event on original `net.Socket`.

Fix: https://github.com/joyent/node/issues/9242
PR-URL: https://github.com/iojs/io.js/pull/891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
lib/_tls_wrap.js
lib/net.js
test/parallel/test-tls-wrap-timeout.js [new file with mode: 0644]