Why would polling be unexpected if the computer was online?  Should the `if` be an `unless` instead?