fix busy-loop in minireader when device is unplugged and we delay closing the handle