Giter Club home page Giter Club logo

Comments (6)

lokonli avatar lokonli commented on May 24, 2024

Probably executing 6x connect can give some issues. I see there is no check on a 'connecting' state.

I'll try to make it more robust, by queuing the slideRequests until it's connected.

from slide-domoticz.

heggink avatar heggink commented on May 24, 2024

For now I made a simple adjustment to connect again in onDisconnect. Looking at the timings, the disconnects seem to happen every 40 minutes or so and the connect itself is pretty fast. Reconnecting on disconnect should ensure that the connection is back up before any bulk changes to the slides happen so it preempts these multi-connects.

If onDisconnect also gets called on plugin shutdown then that is not something I have looked at and can cause problems as well but only if I restart the plugin which is unusual so let's see. I'll report back on the progress.

It's a shame that there's always the compromise in open source between functionality (the great python plugin framework) and the resilience (it really should not crash with a segmentation fault). I have had discussions on that with some people who argue that it's a fact of life and you cannot foresee all situations causing these crashes. Agreed but clearly robust error handling is not part of it :-(...

from slide-domoticz.

heggink avatar heggink commented on May 24, 2024

For now, this reconnect on disconnect means that Domoticz has not crashed in nearly 6 days. Normally it would have already.

from slide-domoticz.

lokonli avatar lokonli commented on May 24, 2024

Nice!
You made the change yourself already. Could you also make a PR (Pull Request)? Then I'll just merge your change.
or copy-paste your code here, and I'll make the change.

from slide-domoticz.

heggink avatar heggink commented on May 24, 2024

Done (I think, I don;t do these very often).
btw: there's also feedback from dnpwwo on the forum that needs a look. Haven't done that yet.

from slide-domoticz.

heggink avatar heggink commented on May 24, 2024

Bugger! another crash with a different error but still in Plugin_ASIO. looked at the message from dnpwwo and applied another change on line 230 replacing & with and. Did not change the statement itself (testing both connection and token in 1 go).

from slide-domoticz.

Related Issues (10)

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.