#12813 HIGH 14.1.0: my settings restart may not respond
Zarro Boogs per Child
bugtracker at laptop.org
Sat Oct 10 04:06:16 EDT 2015
#12813: my settings restart may not respond
-------------------------------------+-------------------------------------
Reporter: Quozl | Owner: Quozl
Type: defect | Status: assigned
Priority: high | Milestone: 14.1.0
Component: sugar | Version: Development build
Resolution: | as of this date
Blocked By: | Keywords: 41002o4
Deployments affected: | Blocking:
Verified: 0 | Action Needed: diagnose
-------------------------------------+-------------------------------------
Comment (by Quozl):
this seems to fix it. add a grace timeout, when it expires ignore the
clients that have not responded and proceed with the shutdown anyway.
{{{
diff --git a/src/jarabe/model/session.py b/src/jarabe/model/session.py
index bb42dd6..af0e599 100644
--- a/src/jarabe/model/session.py
+++ b/src/jarabe/model/session.py
@@ -41,6 +41,7 @@ class SessionManager(GObject.GObject):
SHUTDOWN_TIMEOUT = 1
MAX_SHUTDOWN_TRIES = 10
+ GRACE_TIMEOUT = 15
def __init__(self):
GObject.GObject.__init__(self)
@@ -63,6 +64,7 @@ class SessionManager(GObject.GObject):
self._logout_mode = logout_mode
self.shutdown_signal.emit()
self.session.initiate_shutdown()
+ GObject.timeout_add_seconds(self.GRACE_TIMEOUT,
self.shutdown_completed
def __shutdown_completed_cb(self, session):
GObject.timeout_add_seconds(self.SHUTDOWN_TIMEOUT,
self._try_shutdown)
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/12813#comment:7>
One Laptop per Child <http://one.laptop.org/>
One Laptop per Child bug tracking system
More information about the Bugs
mailing list