moving cancellation cleanup code to @finally block of polling loop