Feb-12-2021, 09:37 PM
The internet is unpredictable. Aside from things timing out, devices sometimes lose connection to the internet, which breaks any sockets they had open. That might not be the issue here, but the point is that expecting a socket to remain open and available indefinitely is a goal that cannot be solved.
Is your while True loop not working? That would be the recommended way (well, possibly with an exponential backoff) to handle automatic reconnections.
Is your while True loop not working? That would be the recommended way (well, possibly with an exponential backoff) to handle automatic reconnections.