Close the socket after anetNonBlock failed.

In original code, the socket doesn't been closed after anetNonBlock failed.