clear socket when connect failed