tls: emit errors happening before handshake finish
This fixes a race condition introduced in 80342f64. `socket.destroy(err)` only emits the passed error when `socket._writableState.errorEmitted === false`, `ssl.onerror` sets `errorEmitted = true` just before calling `socket.destroy()`. See: https://github.com/nodejs/io.js/issues/1119 See: https://github.com/nodejs/io.js/issues/1711 PR-URL: https://github.com/nodejs/io.js/pull/1769 Reviewed-By:Fedor Indutny <fedor@indutny.com>
parent
2bb2f06b
Please register or sign in to comment