Can't check hasNext outside the thread as it causes the first request on the wrong thread. Replace conditionals with a more reliable finally block