handle broken pipes on some SSL servers