[Python] Connection closed: sent 1011 (unexpected error) keepalive ping timeout; no close...

Discussão em 'Python' iniciado por Stack, Outubro 25, 2024.

  1. Stack

    Stack Membro Participativo

    PYTHON. When I try making a websocket connection with a server (external), I am able to connect, get messages for say 10 seconds, then Ill get the title error and have to re-do the handshake. It happens variablly but its roughly every 10-20 seconds that error will pop up. I know a websocket connection should stay open for quite some time, so somethings wrong here. Any advice to keep the socket open? Ive added pings (although I thought the websocket lib in Python handled this) and it didnt work.

    Or is it fine for websockets to be closing and reconnecting this often? I thought it might become resource expensive larger scale if this is the case

    Using Pythons websocket library to make a websocket connection with an external server. I was expecting the connection to remain open and receive/listen for messages for an extended period of time, not close with the title message every 10-15 seconds

    Continue reading...

Compartilhe esta Página