Python Forum
Websocket conection closes abnormally
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Websocket conection closes abnormally
#2
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.
Reply


Messages In This Thread
RE: Websocket conection closes abnormally - by nilamo - Feb-12-2021, 09:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  websocket help johnbob 1 1,395 May-12-2024, 06:20 PM
Last Post: alvpascual
  trying to stream data from a websocket to client tomtom 2 2,177 Jan-12-2023, 03:01 PM
Last Post: Vadanane
  Help with Websocket-Client Module - Infinite Loop CluelessChris 0 4,035 Apr-25-2021, 01:53 PM
Last Post: CluelessChris
  Websocket server not async? korenron 0 1,878 Sep-23-2019, 01:40 PM
Last Post: korenron
  define a variable before looped websocket korenron 0 1,937 Sep-22-2019, 12:53 PM
Last Post: korenron
  need to understand better __setup__.py, websocket-client, packaging penright 0 3,040 Jul-08-2018, 09:40 PM
Last Post: penright
  Pro's and Con's of some different websocket libraries penright 0 2,446 Jun-29-2018, 12:07 PM
Last Post: penright

Forum Jump:

User Panel Messages

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