The websocket of zombie.

Open
#256 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
networking

Research direction

Start by reproducing the reported behavior with the WebSocketClient example in the issue, focusing on the connect and run_forever calls. Inspect the client’s receive and timeout behavior; done means the client no longer silently stops receiving messages, or the expected handling of this condition is clearly established.

Written by the indexing model from the issue text.

Description

from ws4py.client.threadedclient import WebSocketClient

class Client(WebSocketClient):

    def opened(self):
        print("Open")

    def closed(self, code, reason=None):
        print("Closed down:", code, reason)

    def received_message(self, resp):
        data = json.loads(str(resp))
        print(data)

if __name__ == '__main__':
    ws = None
    count = 0
    while True:
        try:
            ws = Client('wss://xxxxxxxxx:xxxxxxxxx')
            ws.connect()
            ws.run_forever()
        except KeyboardInterrupt:
            ws.close()
            break
        except Exception as e:
            continue

Like above of code.
when i run the code,after a while,it wont't receive any messages,and it won't TimeoutError,as if the program has frozen.

Dominant language
Python
Stars
1.1k
Forks
285
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Lawouach/WebSocket-for-Python

All issues in Lawouach/WebSocket-for-Python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.