This patch uses `return` statement to skip the test instead of using `process.exit` call. PR-URL: https://github.com/nodejs/io.js/pull/2109 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This fixes a race condition introduced in 80342f6. `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>
80342f6