Reset pause when last watcher leaves

This commit is contained in:
Tomasz Fluxid Kowalczyk 2012-02-02 22:18:54 +01:00
parent cf488bd995
commit bbd8bb0cfc

View File

@ -124,7 +124,10 @@ class SyncFactory(Factory):
def remove_watcher(self, watcher_proto):
watcher = self.watchers.pop(watcher_proto, None)
if self.pause_change_by == watcher:
self.pause_change_time = None
self.pause_change_by = None
if not self.watchers:
self.paused = True
# send info someone quit
def update_state(self, watcher_proto, counter, paused, position):