fixed typo, add socketpair creation error check