Skip to content

tls: use `.destroy(err)` instead of destroy+emit

Emit errors using .destroy(err) instead of .destroy() and .emit('error', err). Otherwise close event is emitted with the error argument set to false, even if the connection was torn down because of the error.

See: https://github.com/nodejs/io.js/issues/1119

Merge request reports

Loading