Giter Site home page Giter Site logo

Thread exception about pysher HOT 6 CLOSED

deepbrook avatar deepbrook commented on August 14, 2024
Thread exception

from pysher.

Comments (6)

TraderVK avatar TraderVK commented on August 14, 2024

Having exactly the same issue here. Have you found any solution?

from pysher.

deepbrook avatar deepbrook commented on August 14, 2024

I haven't found the time to look into this yet, unfortunately. Anyone else ?

from pysher.

berentn avatar berentn commented on August 14, 2024

I also encountered this bug. It seems to happen in the connection class when it executes _connect(self) after handling an error and it tries to reconnect. My theory is that the thread fails because self.socket.run_forever(**self.socket_kwargs) gets executed for a second time in the while self.needs_reconnect and not self.disconnect_called: loop ( because self.needs_reconnect is set to True by calling reconnect(..) )

I'll take a look into it at a later moment because I need to familiarize myself a bit more with the code to understand how to fix it properly (and find out if that is indeed the cause of the bug)

from pysher.

xmurobi avatar xmurobi commented on August 14, 2024

Met same issue. It looks like the bug from websocket-client. I don't know why the latest version of pysher need requirements = ["websocket-client<=0.48"]. I had compare the 0.48 with the latest version of websocket-client at _app.py(start from line 155, function close). In the old version it doesn't set the self.sock = None after self.sock.close(**kwargs), but latest websocket-client did(at line 164 in _app.py). Which is the reason WebSocketException raise during reconnect.

So @nlsdfnbch, could you help to update the websocket-client to fix this bug? Thanks.

from pysher.

deepbrook avatar deepbrook commented on August 14, 2024

I currently cannot! But you can! We can't upgrade the websocket version until the _on_* methods are made compatible with the new version - since the websocket client doesn't use semantic versioning, the version doesn't show the incompatibility issue with those.

It's a small change, and should be easily resolved. However, I became a dad a few days ago and am otherwise occupied :)

from pysher.

xmurobi avatar xmurobi commented on August 14, 2024

@nlsdfnbch Congratulations!!!

I had submit the merge request to you. Two issues are fixed in this request: 1. Support the latest version of websocket-client. 2. Call reconnect_handler in function _connect_handler. Could you please help to merge and release a new version? I don't want to build my version on pypi.

But the underlying reason that cause error 4201 looks like the pysher will miss the pusher:ping when the server flooding the channel with a mass of data. Which cause the pusher server think that the client was died.

from pysher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.