3

Hello I have a flask application along with a USB card swiper. The swiper's code is here. So the use case is whenever I go to my server and I click next there is a flask route that will start the swiper. Technically the swiper code will be in an infinite while loop until it detects a good swipe. If the swipe is good it will send to next page else if I want to click back there is a back button to return to the homepage.

So my question is when I click back and I go to the swiper again it throws error as Resource Busy. I want the swiper route and the infinite while loop to be killed and start afresh when I click next again from home screen

0 Answers0