sid timeout for long-lasting instances
cmsimike opened this issue · 8 comments
Hi,
I have come from the home-assistant community where we're having an issue around SIDs expiring and causing any instanced SurveillanceStation instances to become stale, requiring a full restart of the app.
What are your thoughts about your library silently re-establishing connections in cases like that? Meaning when you get an exception from Synology:
home-assistant/core#12037
Just recreate the API?
Thanks for raising this, I'll have a look this weekend to see what should be done. Ideally this should be handled inside this lib
@snjoetw Thank you for the response! I'll put my hass PR into a WIP state (I fix this manually in there) but if the connection can be re-established inside your lib, I think that would be the absolute best.
@snjoetw Thank you for your work on this, and apologies for the delay in getting back to you. I will test this out and let you know.
Installed! Ill report back in a few days.
Thanks! Hopefully this fixes your problem.
btw how do you reproduce it? Do you just leave it run for a few days and it’ll start erroring out?
It’s weird that I’ve never seen the error myself. I have a DS216+II with DSM 6.2
Exactly that. I (unfortunately) never paid too much attention when it goes out but eventually after a few days the cameras won't load anymore and I am spammed in the log with exception.
Closing this one and will integrate with next home assistant release