Fix bug of timeout logic of getLocalIp.