control error on socket creation