Account for timeouts as well as connection errors