Comments (6)
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.
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.
For now, this reconnect on disconnect means that Domoticz has not crashed in nearly 6 days. Normally it would have already.
from slide-domoticz.
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.
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.
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)
- onHeartbeat function gives error "failed 'TypeError':'can't subtract offset-naive and offset-aware datetimes'." HOT 6
- Still occasional crash HOT 1
- Sill crashing HOT 9
- New Domoticz blinds subsystem changed commands on 0% and 100% HOT 7
- Status is reversed HOT 8
- Async Secure Read Exception HOT 5
- reduce logging
- reduce tick to prevent disconnect
- Moving to a local API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slide-domoticz.