I think that the socket is invalid, the return should be -1.