Reset the failed socket when connecting