-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle deconnections in idle mode #35
Comments
Wouldn't the 15-second-poll which I had left in idle mode have handled this? (Or are you suggesting to watch NetworkManager state instead?) |
Well yes the 15s poll I've removed might be necessary to handle this case I opened an issue to see if you have a better idea to handle this. I don't think relying on NM is a good idea though |
Was thinking that maybe the case if event & gobject.IO_HUP: would be triggered in case of network deconnection but it's not the case here |
Keep polling for now, to detect connection loss during idle (issue #35). Maybe a better solution will be found in the future.
What kind of disconnection, specifically? IO_HUP can be only triggered when the OS itself notices the connection On Mon, Dec 31, 2012 at 12:59 PM, Jean-Philippe Braun <
Mantas Mikulėnas |
Works for real now, but the log is strange: 2013-01-02 19:08:47,352 mpDris2 DEBUG: Entered idle I don't know why the multiple "Disconnected" messages and currentsong calls... |
The polling mode was handling network deconnections but with the idle method mpDris2 does not detect if the connection is lost.
Anyway mpDris2 does not crash on network deconection/reconnection and when network is back an event is sent on the socket so mpDris2 state is updated.
It would be nicer to detect that the network is gone and then release the dbus name close the socket connection etc...
The text was updated successfully, but these errors were encountered: