0

How can I end a python script if the user closes the chrome tab (I'm using flask)? I'm sending messages to the user's phone in an infinite loop, but I want them to be able to stop receiving messages. The only way to do this so far is to quit the server, so I want them to just be able to close the tab and not receive any more messages (so end the python script).

Nako
  • 3
  • 2

0 Answers0