replace endCurrentPoll calls by currentPoll.stop