Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reconnect to an API?
#1
Hello everyone, my Python program connects to an API, is there any way to make it try and "auto reconnect" every 1 min to the said API if it gets disconnected?

My connection code is on a single thread.. so mechanically, I would need a way to just:

1. detect a disconnect, and
2. IF disconnect found, do a while loop on the thread.start()
3. untill connection restored?

This should be an interesting discussion and hopefully I learn alot from it but I am still pretty new, so simple explanations and code examples are the best Pray
Reply


Messages In This Thread
Reconnect to an API? - by stylingpat - Mar-27-2021, 03:24 PM
RE: Reconnect to an API? - by stylingpat - Mar-27-2021, 05:42 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020